Summary
PromptInput.Prompt (packages/schema/src/prompt-input.ts:29-34) only accepts text, files, agents, skills. A body that also carries model (or any unknown key) is accepted with HTTP 200 and the extra key is silently discarded, so callers believe they selected a model when they did not. Combined with #1 (agent model ignored) this produced turns running on an unintended free model with no error anywhere.
Repro (integration-v2 @ 4668dfc)
POST /api/session/<id>/prompt
{"text":"Reply with exactly: ok","model":{"providerID":"anthropic","modelID":"claude-sonnet-5"}}
→ 200 {"data":{"id":"msg_…"}}
The turn runs on the catalog default model; the model key is never validated or applied. (By contrast, omitting text correctly yields 400 InvalidRequestError: Missing key at ["text"].)
Expected
Either reject unknown keys on the prompt body with a 400 (strict decode), or accept model on the prompt and apply it for that turn (matching POST /api/session which does accept model, and session.switchModel).
Notes
Model.Ref uses id, not modelID, which is a second easy footgun for API users — worth a schema-level rejection so the mismatch is visible.
Summary
PromptInput.Prompt(packages/schema/src/prompt-input.ts:29-34) only acceptstext,files,agents,skills. A body that also carriesmodel(or any unknown key) is accepted with HTTP 200 and the extra key is silently discarded, so callers believe they selected a model when they did not. Combined with #1 (agent model ignored) this produced turns running on an unintended free model with no error anywhere.Repro (integration-v2 @ 4668dfc)
The turn runs on the catalog default model; the
modelkey is never validated or applied. (By contrast, omittingtextcorrectly yields400 InvalidRequestError: Missing key at ["text"].)Expected
Either reject unknown keys on the prompt body with a 400 (strict decode), or accept
modelon the prompt and apply it for that turn (matchingPOST /api/sessionwhich does acceptmodel, andsession.switchModel).Notes
Model.Refusesid, notmodelID, which is a second easy footgun for API users — worth a schema-level rejection so the mismatch is visible.