mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-03 19:24:59 +00:00
style: Format code according to linter rules
This commit is contained in:
parent
245ee84c2d
commit
649742f02a
1 changed files with 12 additions and 6 deletions
|
@ -665,7 +665,7 @@ class Model(ModelSettings):
|
||||||
self.extra_params = {}
|
self.extra_params = {}
|
||||||
|
|
||||||
# OpenRouter models use 'reasoning' instead of 'thinking'
|
# OpenRouter models use 'reasoning' instead of 'thinking'
|
||||||
if self.name.startswith('openrouter/'):
|
if self.name.startswith("openrouter/"):
|
||||||
self.extra_params["reasoning"] = {"max_tokens": num_tokens}
|
self.extra_params["reasoning"] = {"max_tokens": num_tokens}
|
||||||
else:
|
else:
|
||||||
self.extra_params["thinking"] = {"type": "enabled", "budget_tokens": num_tokens}
|
self.extra_params["thinking"] = {"type": "enabled", "budget_tokens": num_tokens}
|
||||||
|
@ -676,10 +676,16 @@ class Model(ModelSettings):
|
||||||
|
|
||||||
if model.extra_params:
|
if model.extra_params:
|
||||||
# Check for OpenRouter reasoning format
|
# Check for OpenRouter reasoning format
|
||||||
if "reasoning" in model.extra_params and "max_tokens" in model.extra_params["reasoning"]:
|
if (
|
||||||
|
"reasoning" in model.extra_params
|
||||||
|
and "max_tokens" in model.extra_params["reasoning"]
|
||||||
|
):
|
||||||
budget = model.extra_params["reasoning"]["max_tokens"]
|
budget = model.extra_params["reasoning"]["max_tokens"]
|
||||||
# Check for standard thinking format
|
# Check for standard thinking format
|
||||||
elif "thinking" in model.extra_params and "budget_tokens" in model.extra_params["thinking"]:
|
elif (
|
||||||
|
"thinking" in model.extra_params
|
||||||
|
and "budget_tokens" in model.extra_params["thinking"]
|
||||||
|
):
|
||||||
budget = model.extra_params["thinking"]["budget_tokens"]
|
budget = model.extra_params["thinking"]["budget_tokens"]
|
||||||
|
|
||||||
if budget is not None:
|
if budget is not None:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue