Repository navigation
Stop sending temperature to OpenRouter (fixes Claude Opus 5 404) - #134
Conversation
Claude Opus 5 requests failed with "No endpoints found that can handle the requested parameters". The catalog marked Opus 5 as accepting temperature, but none of its 11 OpenRouter endpoints do, and require_parameters: true drops every endpoint that lacks a sent parameter. Temperature is now gone from every request: the catalog flag, the ai and ai-stream payloads, the research sub-calls, the JSON repair retry, and the client's saved feature settings. Saved settings that still carry a temperature get rewritten once through the existing canonical check. Older clients that still send temperature are ignored by the server. The routing test now fails if any catalog model's request carries temperature. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Next included review available in 49 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (2)
ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (24)
💤 Files with no reviewable changes (5)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe change removes temperature from feature settings, client request construction, server AI call contracts, and provider payloads. Model catalog temperature-support metadata is removed. Reasoning-effort handling and other listed model attributes remain. ChangesTemperature removal
Estimated code review effort: 2 (Simple) | ~12 minutes
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Essentials by visiting https://app.coderabbit.ai/settings/billing. Comment |
|
CI did not run. Every Actions job stopped within 1 to 3 seconds with "The job was not started because recent account payments have failed or your spending limit needs to be increased" (for example, the quality job). That's the Actions billing limit, not this change. The same ladder
Not run: the database gate. The PR has no migrations or SQL, and another worktree holds the shared local Supabase stack. |
Dropping temperature makes every saved feature_configs non-canonical, so every existing user now takes the one-time rewrite path. That write sent the whole snapshot read at hydration, so a model choice saved in the meantime could be reverted on the server. The rewrite now applies only while updated_at still matches the read, and only if the user has not changed settings locally since hydration. A skipped cleanup retries on the next hydration. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Codex review r1 (head
Confirmed. Before this PR, only users with legacy model IDs took that path. Now the rewrite applies only while Test: |
Problem
Every Claude Opus 5 request failed with:
The catalog marked Opus 5 as
supportsTemperature: true, so we senttemperature. None of Opus 5's 11 OpenRouter endpoints accept it, andprovider.require_parameters: truedrops any endpoint that doesn't support every parameter in the request. Nothing was left to route to. Auto Pro could pick Opus 5 too, so it was hit the same way. The JSON repair retry always senttemperature: 0, so that path had the same problem for any model flagged as supporting it.Change
temperatureis removed from every model request:supportsTemperaturecatalog field is gone, theaiandai-streampayloads no longer include it, and the feature handlers, research sub-calls and JSON repair retry stop passing it. Atemperaturesent by an older cached client is ignored.ProviderConfigno longer hastemperature. The settings store drops it from defaults and normalization. Savedfeature_configsthat still contain it fail the existing canonical check once and get rewritten without it.handler-research.test.tsnow fails if any catalog model's request body containstemperature. It failed on the old code (first hit: Gemini 3.8 Flash) and passes now.Deploy order doesn't matter. Either side works with the old version of the other.
Verification
npm run lint,npm run typecheck,npm test(273 passed),npm run build: all pass locally.npm run test:edge: 333 passed, including the guard.anthropic/claude-opus-5andgoogle/gemini-3.8-flashthrough the newcallOpenRouterwith the production key shape. Both returned valid JSON, and the request keys weremax_tokens, messages, model, provider, reasoning, response_format. Before the change, the same Opus 5 request reproduced the 404 exactly.verify-debatelabbrowser pass. Another worktree's thread holds the shared local Supabase stack. The client change only removes a field from request bodies.After merge
The
aiandai-streamEdge Functions need deploying (staging, then production). The Vercel merge deploy only ships the client.🤖 Generated with Claude Code
Summary by CodeRabbit