feat(ai-import): use OpenRouter supported_parameters for temperature - #6
Open
silasg wants to merge 1 commit into
Conversation
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
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.
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 supportstemperatureand 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.Changes
supported_parametersintoCloudModel.supportsTemperature(true/false;undefinedwhen the provider advertises nothing).cloud_ai_model_supports_temperaturesetting (null= unknown; cleared when the provider changes).supportsTemperature.Testing
Added a model-list spec asserting
supportsTemperatureis derived correctly fromsupported_parameters(present →true, absent →false, no metadata →undefined).🤖 Generated with Claude Code
Generated by Claude Code