fix(mcplocal): learn which models reject sampling params #128
Reference in New Issue
Block a user
Delete Branch "deploy/bounded-failures"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #127, found by that deploy's own smoke output.
Auto-following to the newest Opus moved the failure rather than removing it. The 404 "model not found" became:
Anthropic removed
temperature/top_p/top_kon the current generation (Opus 5, Sonnet 5, Opus 4.7/4.8, Fable 5), and the adapter sendstemperature: 0unconditionally — so gate prompt-selection was still degrading on every call, just with a different status code.A hardcoded list of which models accept sampling would rot exactly the way the pinned model ids did — which is what this whole line of work is trying to stop. So the provider learns it: the first 400 naming a sampling parameter drops it and retries, and remembers the model so later calls omit it up front. One wasted call, once.
The match is deliberately narrow — the 400 must actually name
temperature/top_p/top_k. An unrelated 400 (missingmax_tokens, bad schema) propagates untouched, with a test, because a broad match would silently swallow real request errors and retry them pointlessly.Verified live:
claude-opus-latest→claude-opus-5, first attempt 400 on temperature, retry gets past it. The retry then hit 429 — the personal OAuth token's rate limit, which is the pre-existing credential-tiering issue, not this path.2,803 tests pass.
🤖 Generated with Claude Code
https://claude.ai/code/session_01GqMidYEGUJG5fxeoTELBu2