Skip to content

[bug] Custom OpenAI-compatible provider models are missing from model picker #444

Description

@alecuba16

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:

https://github.com/alecuba16/jcode/tree/fix-custom-provider-model-picker

Commit:

alecuba16@50266321

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions