Skip to content

Commit 4d8a0aa

Browse files
rohita5lclaude
andauthored
Exclude databricks-claude-opus-4-8 from Claude model discovery (#115)
The AI Gateway lists opus-4-8 but currently rejects it at launch with "The provided model identifier is invalid.", so filter it out at discovery to pin agent harnesses to opus-4-7. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1 parent fd86dd3 commit 4d8a0aa

2 files changed

Lines changed: 12 additions & 13 deletions

File tree

src/ucode/databricks.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,14 @@ def build_auth_shell_command(workspace: str, profile: str | None = None) -> str:
804804
)
805805

806806

807+
# Model ids the AI Gateway advertises but currently rejects at launch with
808+
# "The provided model identifier is invalid." Filter them out at discovery so
809+
# agent harnesses don't try to boot with them.
810+
_CLAUDE_MODEL_DISCOVERY_DENYLIST = {
811+
"databricks-claude-opus-4-8",
812+
}
813+
814+
807815
def discover_claude_models(workspace: str, token: str) -> tuple[dict[str, str], str | None]:
808816
"""Discover Claude families on this workspace's AI Gateway.
809817
@@ -820,7 +828,9 @@ def discover_claude_models(workspace: str, token: str) -> tuple[dict[str, str],
820828
raw_ids = [
821829
m["id"]
822830
for m in data.get("data", [])
823-
if isinstance(m.get("id"), str) and not m["id"].endswith("-anthropic")
831+
if isinstance(m.get("id"), str)
832+
and not m["id"].endswith("-anthropic")
833+
and m["id"] not in _CLAUDE_MODEL_DISCOVERY_DENYLIST
824834
]
825835

826836
result: dict[str, str] = {}

tests/test_e2e.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -93,19 +93,8 @@ def _run_gemini_gateway_smoke(workspace: str, model: str, token: str) -> str:
9393
return data.get("candidates", [{}])[0].get("content", {}).get("parts", [{}])[0].get("text", "")
9494

9595

96-
E2E_EXCLUDED_MODEL_IDS = {
97-
# Listed by AI Gateway model discovery, but currently rejected at launch
98-
# with "The provided model identifier is invalid."
99-
"databricks-claude-opus-4-8",
100-
}
101-
102-
10396
def _launchable_model_items(models: dict) -> list[tuple[str, str]]:
104-
return [
105-
(family, model_id)
106-
for family, model_id in models.items()
107-
if model_id and model_id not in E2E_EXCLUDED_MODEL_IDS
108-
]
97+
return [(family, model_id) for family, model_id in models.items() if model_id]
10998

11099

111100
# ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)