Repository navigation
Description
Summary
Custom OpenAI-compatible provider profiles configured in ~/.jcode/config.toml with static [[providers.<name>.models]] entries are not shown in the TUI model picker. This makes the models hard or impossible to select from the picker, even though the provider profile is valid and can be used as the default provider/model.
Reproduction
Add a custom OpenAI-compatible provider profile:
[provider]
default_provider = "my-gateway"
default_model = "vendor/my-model"
[providers.my-gateway]
type = "openai-compatible"
base_url = "https://example.com/proxy/openai"
auth = "none"
default_model = "vendor/my-model"
provider_routing = false
model_catalog = false
allow_provider_pinning = false
[[providers.my-gateway.models]]
id = "vendor/my-model"
context_window = 230000
input = ["text"]Then open the TUI model picker.
Actual behavior
The configured custom provider model does not appear in the TUI model picker, so it cannot be selected from the list.
The profile itself is valid. jcode provider current can resolve the configured default provider/model, and the model can be used if already selected by config or passed explicitly.
Expected behavior
Models declared under [[providers.<name>.models]] should appear in the model picker with a route back to that provider profile, for example:
- model:
vendor/my-model - provider:
my-gateway - api method:
openai-compatible:my-gateway
Text-capable configured models should be selectable the same way built-in OpenAI-compatible profile models are selectable.
Notes
This appears to be a model picker/catalog routing gap. Built-in OpenAI-compatible profiles are added to the picker, but arbitrary user-defined [providers.<name>] profiles are not included unless they are active through another path.
I prepared a fix branch that adds route generation for custom named provider profiles and includes a unit test:
Commit:
Activity
[-]Custom OpenAI-compatible provider models are missing from model picker[/-][+][bug] Custom OpenAI-compatible provider models are missing from model picker[/+]hiSandog commentedon Jul 6, 2026
A useful test here would cover both the normal
~/.jcode/config.tomlpath and the edge case from this report. That should make it clear whether the fix belongs in input normalization/validation, configuration forwarding, or the lower-level execution path.alecuba16 commentedon Jul 6, 2026
Addressed in 61b44001. Added two end-to-end tests that exercise the full config.toml -> route generation flow:
custom_provider_models_appear_via_config_file: the normal~/.jcode/config.tomlpath, verifying text-capable + default models surface in the picker while image-only models are excluded.custom_provider_route_matches_issue_444_reproduction: the exact edge case from the report (provider_routing=false,model_catalog=false,allow_provider_pinning=false) to pin that the fix is in route generation / config forwarding, not input normalization/validation or the execution path.Both write a real TOML file to
\$JCODE_HOME/config.toml, invalidate the config cache, and build routes throughMultiProvider::model_routes()— the same path a real user hits. All 7catalog_routestests pass.feat(provider): surface named config provider models in the model pic…
1jehuang commentedon Jul 6, 2026
Triage: confirmed. Named
[providers.<name>]config profiles only contributed routes when they were the active provider; static[[providers.<name>.models]]entries were never surfaced otherwise.Fixed on master in af1df25:
[[providers.<name>.models]]entries (plusdefault_modelfallback) appear withprovider = <name>,api_method = openai-compatible:<name>. Image-only models (input = ["image"]) are excluded.<name>:<model>spec binds the named profile runtime (newset_model_on_named_provider_profilepath).default_provider = "<name>"in config also binds the profile directly now, instead of routing through the generic OpenRouter slot (same silent-fallback class asdefault_provider = "deepseek"withdefault_model = "deepseek-v4-pro"silently falls back to Claude on startup #448).An end-to-end test covers your exact reproduction config (picker presence, image-only exclusion, spec selection, and config default binding). Will close automatically on the next release.
1jehuang commentedon Jul 7, 2026
Released in v0.37.0. Run
jcode updateto get it.feat(provider): surface named config provider models in the model pic…
feat(provider): surface named config provider models in the model pic…