fix(runtime): preserve resolved fork metadata
Some checks are pending
CI / Detect affected areas (push) Waiting to run
CI / Python tests (push) Blocked by required conditions
CI / Python lints (push) Blocked by required conditions
CI / TypeScript (push) Blocked by required conditions
CI / Docs Site (push) Blocked by required conditions
CI / Deny unrelated histories (push) Blocked by required conditions
CI / Check contributors (push) Blocked by required conditions
CI / Check uv.lock (push) Blocked by required conditions
CI / Lint Docker scripts (push) Blocked by required conditions
CI / Build&Test Docker image (push) Blocked by required conditions
CI / Supply-chain scan (push) Blocked by required conditions
CI / OSV scan (push) Waiting to run
CI / All required checks pass (push) Blocked by required conditions
CI / CI timing report (push) Blocked by required conditions
Deploy Site / deploy-vercel (push) Waiting to run
Deploy Site / deploy-docs (push) Waiting to run

This commit is contained in:
kshitijk4poor 2026-07-10 17:57:15 +05:30 committed by kshitij
parent 97e9c64664
commit 8727e67295
2 changed files with 42 additions and 1 deletions

View file

@ -1265,6 +1265,24 @@ class TestDelegationCredentialResolution(unittest.TestCase):
requested="crof.ai", target_model="deepseek-v4-pro-CEER"
)
@patch("hermes_cli.runtime_provider.resolve_runtime_provider")
def test_provider_forwards_runtime_request_overrides_and_output_cap(self, mock_resolve):
mock_resolve.return_value = {
"provider": "custom",
"model": "real-model",
"base_url": "https://gateway.example/v1",
"api_key": "gateway-key",
"api_mode": "chat_completions",
"request_overrides": {"extra_body": {"store": False}},
"max_output_tokens": 3072,
}
creds = _resolve_delegation_credentials(
{"model": "real-model", "provider": "gateway"},
_make_mock_parent(depth=0),
)
self.assertEqual(creds["request_overrides"], {"extra_body": {"store": False}})
self.assertEqual(creds["max_output_tokens"], 3072)
@patch("hermes_cli.runtime_provider.resolve_runtime_provider")
def test_standard_provider_not_overwritten_by_configured_name(self, mock_resolve):
"""Standard (non-custom) providers must still return runtime identity,