fix(agent): resolve thinking_level from model config by model ID or name
Fix cfg.GetModelConfig(model) at instance.go:160 to correctly resolve thinking_level when model is a full model ID (e.g. openrouter/qwen3.6-plus-preview:free) instead of a model_name (e.g. openrouter). GetModelConfig only matches by model_name, but lookupModelConfigByRef handles both model_name and full model ID. This fixes the issue where thinking_level was not being read from the config. Fixes #2286
This commit is contained in:
parent
15a70ac45c
commit
6977b0f84b
1 changed files with 1 additions and 1 deletions
|
|
@ -157,7 +157,7 @@ func NewAgentInstance(
|
|||
}
|
||||
|
||||
var thinkingLevelStr string
|
||||
if mc, err := cfg.GetModelConfig(model); err == nil {
|
||||
if mc := lookupModelConfigByRef(cfg, model); mc != nil {
|
||||
thinkingLevelStr = mc.ThinkingLevel
|
||||
}
|
||||
thinkingLevel := parseThinkingLevel(thinkingLevelStr)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue