Skip to content

The agent that grows with you

fix(aux): fallback ladder route carries the client base_url; test builds the route by name

teknium1b1c578196a78
diff --git a/agent/auxiliary_fallback_recovery.py b/agent/auxiliary_fallback_recovery.py
index cce6e933633..5875348a7cb 100644
--- a/agent/auxiliary_fallback_recovery.py
+++ b/agent/auxiliary_fallback_recovery.py
@@ -15,7 +15,8 @@ def _parameter_ladder(first_err: Exception, client: Any, kwargs: Dict[str, Any],
# Keyword construction: the route tuple grows with every new ladder rung (a positional 13-tuple
# broke the moment a sibling PR added ``timeout``); fields this ladder never reads stay None.
route = _LadderRoute(**{**dict.fromkeys(_LadderRoute._fields), "client": client, "task": task,
- "tag": tag, "async_mode": bool(tag), "base_info": "", "resolved_provider": ""})
+ "tag": tag, "async_mode": bool(tag), "resolved_provider": "",
+ "base_info": str(getattr(client, "base_url", "") or "")})
max_tokens = kwargs.get("max_tokens") or kwargs.get("max_completion_tokens")
resp, err, _ = yield from _ladder_parameter_rungs(first_err, route, kwargs, max_tokens)
if err is None:
diff --git a/tests/agent/test_auxiliary_parameter_rung_chaining.py b/tests/agent/test_auxiliary_parameter_rung_chaining.py
index 7ebae5d0642..ee7dc44ef93 100644
--- a/tests/agent/test_auxiliary_parameter_rung_chaining.py
+++ b/tests/agent/test_auxiliary_parameter_rung_chaining.py
@@ -51,7 +51,8 @@ def _rejecting_client(*rejected_fields):
def test_primary_rungs_chain_in_provider_order_and_strip_each_field_once():
client = _rejecting_client("reasoning_effort", "temperature", "max_tokens")
kwargs = {"model": "m", "messages": [], "temperature": 0.3, "max_tokens": 64, "reasoning_effort": "none"}
- route = _LadderRoute(client, "title_generation", "", False, "", "", None, None, None, None, None, None, None)
+ route = _LadderRoute(**{**dict.fromkeys(_LadderRoute._fields), "client": client, "task": "title_generation",
+ "tag": "", "async_mode": False, "base_info": "", "resolved_provider": ""})
first_err = _Bad400("Error code: 400 - Unsupported value: 'reasoning_effort' does not support 'none'")
def perform(step):