Conversation
wbe7
force-pushed
the
codex/custom-provider-desktop-ui
branch
2 times, most recently
from
June 4, 2026 13:06
91695f8 to
2fda2c1
Compare
wbe7
force-pushed
the
codex/custom-provider-desktop-ui
branch
from
June 4, 2026 13:17
2fda2c1 to
f7d7ba0
Compare
Collaborator
|
Thanks for the custom-provider Desktop work. This is now redundant with a later implementation already on
The related #38975 discussion's manual-model fallback for unavailable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #38975.
Adds first-class Desktop support for reusable OpenAI-compatible custom providers. The flow is intentionally generic: it is not tied to AI Router, LiteLLM, LM Studio, or any single service.
What changed
POST /api/providers/customfor creating/updating custom providers in Desktop.providers:in config and keep secrets in.envvia a generatedkey_env.https://ai-router.app/api/v1->ai-router.appai-router-appCUSTOM_PROVIDER_AI_ROUTER_APP_API_KEYGET {base_url}/models.https://ai-router.app/api/v1->https://ai-router.app/api/v1/modelsCustom providerappears like the other provider rows.key_env.Local / custom endpointcustom-provider flow to require only Base URL plus optional API key.Notes
This keeps custom-provider credentials isolated from generic
OPENAI_API_KEY, so arbitrary custom hosts only receive the key explicitly configured for that custom provider.For local Desktop testing, the packaged renderer and Python backend must come from the same checkout. If a locally packaged app starts the already-installed
~/.hermes/hermes-agentbackend from an older commit,POST /api/providers/customcan return405 Method Not Allowedbecause the backend route is not present there. UseHERMES_DESKTOP_HERMES_ROOT=/path/to/checkoutwhen testing this PR locally.Validation
npm run --prefix apps/desktop type-checknpm run --prefix apps/desktop test:ui -- src/app/settings/providers-settings.test.tsx src/store/onboarding.test.ts src/components/desktop-onboarding-overlay.test.tsxuv run --extra dev pytest tests/hermes_cli/test_web_server.py::TestWebServerEndpoints::test_set_model_main_custom_persists_base_url tests/hermes_cli/test_web_server.py::TestWebServerEndpoints::test_set_model_main_non_custom_clears_stale_base_url tests/hermes_cli/test_web_server.py::TestWebServerEndpoints::test_create_custom_provider_persists_named_provider_key_and_active_model tests/hermes_cli/test_web_server.py::TestWebServerEndpoints::test_create_custom_provider_can_discover_models_without_user_model -quv run --extra dev ruff check hermes_cli/web_server.py tests/hermes_cli/test_web_server.pystore/onboarding*.