currentThinkingLevel maps a model config's thinking_budget onto an [effort.Level]. A nil, disabled, token-based, or adaptive budget is reported as [effort.None] so the first cycle step lands on a concrete effort level.
(cfg *latest.ModelConfig)
| 303 | // reported as [effort.None] so the first cycle step lands on a concrete |
| 304 | // effort level. |
| 305 | func currentThinkingLevel(cfg *latest.ModelConfig) effort.Level { |
| 306 | if l, ok := cfg.ThinkingBudget.EffortLevel(); ok { |
| 307 | return l |
| 308 | } |
| 309 | return effort.None |
| 310 | } |
| 311 | |
| 312 | // setAgentModelInternal applies modelRef as the agent's model override and |
| 313 | // returns a snapshot of the value that was just stored. The snapshot is |