Repository navigation
docs(api): describe the model override in Claude Platform terms - #392
Merged
neuromechanist merged 1 commit intoSep 17, 2026
Conversation
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
merged commit Sep 17, 2026
03ba00e
into
feature/issue-360-epic-anthropic-platform
3 of 4 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #360.
The
modelfield on/{community}/askand/{community}/chatstill described itself as "Optional model override (OpenRouter format: creator/model-name). Requires BYOK." Both halves are stale after the migration:claude-haiku-4-5,claude-sonnet-5), notcreator/model-nameslugs. A caller following the description gets a 400._select_modelallows 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_MODELSand shared by both request bodies, so a third offered model cannot leave it naming two.Tests
AskRequestandChatRequestuse it, since they resolve the model identicallytests/test_apiandtests/test_frontendpass (450 passed)Each test was checked by reverting the fix and confirming it fails.