Skip to content

fix(gateway): pass config api key to model switch#18685

Open
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/gateway-model-api-key-18681
Open

fix(gateway): pass config api key to model switch#18685
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/gateway-model-api-key-18681

Conversation

@LeonSGP43

Copy link
Copy Markdown
Contributor

Summary

  • Read model.api_key from gateway config when handling /model commands.
  • Pass the configured key into the existing model switch path so authenticated custom endpoints can be probed.
  • Add a gateway regression test that asserts /model uses the configured API key.

Fixes #18681

Tests

  • scripts/run_tests.sh tests/gateway/test_model_command_custom_providers.py
  • git diff --check origin/main...HEAD

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/gateway Gateway runner, session dispatch, delivery area/config Config system, migrations, profiles labels May 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(gateway): /model command fails on custom providers — api_key not read from config

2 participants