Add pooled same-provider credential fallback
This commit is contained in:
@@ -593,7 +593,14 @@ class TestDelegationCredentialResolution(unittest.TestCase):
|
||||
"model": "qwen2.5-coder",
|
||||
"base_url": "http://localhost:1234/v1",
|
||||
}
|
||||
with patch.dict(os.environ, {"OPENROUTER_API_KEY": "env-openrouter-key"}, clear=False):
|
||||
with patch.dict(
|
||||
os.environ,
|
||||
{
|
||||
"OPENROUTER_API_KEY": "env-openrouter-key",
|
||||
"OPENAI_API_KEY": "",
|
||||
},
|
||||
clear=False,
|
||||
):
|
||||
with self.assertRaises(ValueError) as ctx:
|
||||
_resolve_delegation_credentials(cfg, parent)
|
||||
self.assertIn("OPENAI_API_KEY", str(ctx.exception))
|
||||
|
||||
Reference in New Issue
Block a user