Skip to content

feat(ai-import): use OpenRouter supported_parameters for temperature - #6

Open
silasg wants to merge 1 commit into
claude/issue-1151-fix-proposal-4a0dkffrom
claude/issue-1151-openrouter-temperature-capability
Open

feat(ai-import): use OpenRouter supported_parameters for temperature#6
silasg wants to merge 1 commit into
claude/issue-1151-fix-proposal-4a0dkffrom
claude/issue-1151-openrouter-temperature-capability

Conversation

@silasg

@silasg silasg commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

Builds on #4. OpenRouter advertises each model's accepted parameters via supported_parameters. When a model is picked from that provider, we now record whether it supports temperature and pass it into the request config — so a model known not to accept it skips even the first (doomed) attempt instead of learning by failure.

Stacked on #4 — base branch is claude/issue-1151-fix-proposal-4a0dkf. Review/merge #4 first; the diff here is only the OpenRouter capability wiring. Independent of #5.

Changes

  • Parse supported_parameters into CloudModel.supportsTemperature (true/false; undefined when the provider advertises nothing).
  • Carry the flag from the model picker into a new cloud_ai_model_supports_temperature setting (null = unknown; cleared when the provider changes).
  • Feed it into the cloud LLM request config as supportsTemperature.

Testing

Added a model-list spec asserting supportsTemperature is derived correctly from supported_parameters (present → true, absent → false, no metadata → undefined).

Same environment caveat as #4: the pure cloud-model-list mapping is verified via an esbuild bundle of the real module and tsc; the picker/settings wiring is syntax-checked but the full Karma run is blocked locally by the xlsx egress policy. Please confirm via pnpm test in CI.

🤖 Generated with Claude Code


Generated by Claude Code

OpenRouter advertises each model's accepted parameters. When a model is
picked from that provider, record whether it supports `temperature` and
pass it into the request config, so a model known not to accept it skips
even the first (doomed) attempt instead of learning by failure.

- parse `supported_parameters` into `CloudModel.supportsTemperature`
- carry the flag through the model picker into a new
  `cloud_ai_model_supports_temperature` setting (null = unknown)
- feed it into the cloud LLM request config

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DKKv2cbKhcgE2cTbkhvzjd
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.

2 participants