Skip to content

docs(api): describe the model override in Claude Platform terms - #392

Merged
neuromechanist merged 1 commit into
feature/issue-360-epic-anthropic-platformfrom
feature/model-override-description
Sep 17, 2026
Merged

neuromechanist merged 1 commit into
feature/issue-360-epic-anthropic-platformfrom
feature/model-override-description

Conversation

@neuromechanist

Copy link
Copy Markdown
Member

Part of #360.

The model field on /{community}/ask and /{community}/chat still described itself as "Optional model override (OpenRouter format: creator/model-name). Requires BYOK." Both halves are stale after the migration:

  • The ids the Claude Platform accepts are bare first-party ones (claude-haiku-4-5, claude-sonnet-5), not creator/model-name slugs. A caller following the description gets a 400.
  • _select_model allows either offered model from any caller. BYOK is only needed for an id the platform does not offer, which is the OpenRouter path.

This is the description the OpenAPI schema, /docs, and the generated API reference all show, so it is the one place a caller learns the rule.

The replacement is built from OFFERED_MODELS and shared by both request bodies, so a third offered model cannot leave it naming two.

Tests

  • The description names every offered model
  • It names nothing the platform does not offer (the stale case this replaced)
  • Both AskRequest and ChatRequest use it, since they resolve the model identically
  • tests/test_api and tests/test_frontend pass (450 passed)

Each test was checked by reverting the fix and confirming it fails.

The `model` field on /ask and /chat still advertised "OpenRouter format:
creator/model-name. Requires BYOK." Both halves are now wrong: the ids the
platform accepts are bare first-party ones, and _select_model allows either
offered model from any caller, since the platform runs only those two and
neither can be used to run up an unbounded bill. A caller reading /docs was
being told to bring a key they do not need, in a format that gets a 400.

The description is built from OFFERED_MODELS and shared by both request
bodies, so a third offered model cannot leave it naming two.

Tested: drift tests that it names every offered model, names nothing the
platform does not offer, and is the description both bodies actually use.
@neuromechanist
neuromechanist merged commit 03ba00e into feature/issue-360-epic-anthropic-platform Sep 17, 2026
3 of 4 checks passed
@neuromechanist
neuromechanist deleted the feature/model-override-description branch September 17, 2026 17:00
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.

1 participant