fix(gateway): handle provider command without config
This commit is contained in:
@@ -3861,6 +3861,7 @@ class GatewayRunner:
|
|||||||
|
|
||||||
# Resolve current provider from config
|
# Resolve current provider from config
|
||||||
current_provider = "openrouter"
|
current_provider = "openrouter"
|
||||||
|
model_cfg = {}
|
||||||
config_path = _hermes_home / 'config.yaml'
|
config_path = _hermes_home / 'config.yaml'
|
||||||
try:
|
try:
|
||||||
if config_path.exists():
|
if config_path.exists():
|
||||||
|
|||||||
@@ -105,10 +105,6 @@ class TestTelegramSlashCommands:
|
|||||||
send_status.assert_called_once()
|
send_status.assert_called_once()
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
@pytest.mark.xfail(
|
|
||||||
reason="Bug: _handle_provider_command references unbound model_cfg when config.yaml is absent",
|
|
||||||
strict=False,
|
|
||||||
)
|
|
||||||
async def test_provider_shows_current_provider(self, adapter):
|
async def test_provider_shows_current_provider(self, adapter):
|
||||||
send = await send_and_capture(adapter, "/provider")
|
send = await send_and_capture(adapter, "/provider")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user