mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-29 06:31:32 +00:00
fix(gateway): guard against None request_overrides in _build_api_kwargs
This commit is contained in:
parent
1d8b9e6458
commit
e4b69bf149
3 changed files with 12 additions and 4 deletions
|
|
@ -118,7 +118,7 @@ def test_turn_route_skips_priority_processing_for_unsupported_models():
|
|||
|
||||
route = gateway_run.GatewayRunner._resolve_turn_agent_config(runner, "hi", "gpt-5.3-codex", runtime_kwargs)
|
||||
|
||||
assert route["request_overrides"] is None
|
||||
assert route["request_overrides"] == {}
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
|
|
|||
|
|
@ -251,6 +251,14 @@ class TestBuildApiKwargsChatCompletionsServiceTier:
|
|||
kwargs = agent._build_api_kwargs(messages)
|
||||
assert "service_tier" not in kwargs
|
||||
|
||||
def test_no_crash_when_request_overrides_is_none(self, monkeypatch):
|
||||
agent = _make_agent(monkeypatch, "openrouter")
|
||||
agent.model = "gpt-4.1"
|
||||
agent.request_overrides = None
|
||||
messages = [{"role": "user", "content": "hi"}]
|
||||
kwargs = agent._build_api_kwargs(messages)
|
||||
assert "service_tier" not in kwargs
|
||||
|
||||
|
||||
class TestBuildApiKwargsKimiNoTemperatureOverride:
|
||||
def test_kimi_for_coding_omits_temperature(self, monkeypatch):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue