Skip to content

[AIGTWY-4564] Add Claude parent schema discovery - #540

Open
andy-xu-db wants to merge 6 commits into
mainfrom
aigtwy-4564-claude-parent-schema
Open

[AIGTWY-4564] Add Claude parent schema discovery#540
andy-xu-db wants to merge 6 commits into
mainfrom
aigtwy-4564-claude-parent-schema

Conversation

@andy-xu-db

@andy-xu-db andy-xu-db commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add --parent <catalog>.<schema> to Claude launches
  • enable model discovery and scope it to the selected schema
  • keep model provider routing authoritative

Testing

  • focused Claude parent-schema suites (526 passed)
  • mixed Bedrock Claude/GPT target test
  • Ruff check and format check
  • LiteSwap: Claude /model matched all 14 models under main.andy

e2e test with LiteSwap

Claude model picker

@andy-xu-db
andy-xu-db force-pushed the aigtwy-4564-claude-parent-schema branch from 7e57c4c to 914eef7 Compare September 10, 2026 14:32
@andy-xu-db andy-xu-db changed the title [AIGTWY-4564] Add Claude parent schema discovery [AIGTWY-4565] Inject Claude provider into model discovery Sep 10, 2026
@andy-xu-db
andy-xu-db force-pushed the aigtwy-4564-claude-parent-schema branch from 914eef7 to 7e57c4c Compare September 10, 2026 14:45
@andy-xu-db andy-xu-db changed the title [AIGTWY-4565] Inject Claude provider into model discovery [AIGTWY-4564] Add Claude parent schema discovery Sep 10, 2026
Comment thread src/ucode/agents/claude.py Outdated
]
if provider:
header_lines.append(f"Databricks-Model-Provider-Service: {provider}")
elif parent_schema:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a comment saying why you can't have both a provider service head and a model service parent schema

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added comment

Comment thread src/ucode/cli.py Outdated
Comment on lines +1973 to +1979
if parent_schema is not None:
parts = parent_schema.split(".")
if len(parts) != 2 or any(
not part or any(ch in " /" or ord(ch) < 32 or ord(ch) == 127 for ch in part)
for part in parts
):
raise RuntimeError("--parent must be `<catalog>.<schema>`.")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks....concerning. can you see if ucode already has some validation like this? if no, can you put it into a string utils file and add unit tests for that util file only

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved to string utils file

@lilly-luo

Copy link
Copy Markdown
Collaborator

can u test with a bedrock provider that has claude and gpt models as well?

Comment thread src/ucode/agents/claude.py Outdated
"x-databricks-use-coding-agent-mode",
"user-agent",
"databricks-model-provider-service",
"databricks-model-service-parent-schema",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added as constants in const file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants