Bug Report: Custom openai-compatible models incorrectly tagged with copilot: prefix in model picker
Summary
When using custom openai-compatible providers (e.g., local MLX servers via the omlx profile), the /model picker incorrectly labels the models with PROVIDER = Copilot and constructs internal model IDs with the copilot: prefix (e.g., copilot:KAT-Coder-V2.5-Dev-OptiQ-4bit). This causes "model not found" errors when selecting the model.
Reproduction
- Configure a custom provider in
~/.jcode/config.toml:
[providers.omlx]
type = "openai-compatible"
base_url = "http://127.0.0.1:18000/v1"
default_model = "KAT-Coder-V2.5-Dev-OptiQ-4bit"
- Start jcode with the profile:
jcode --provider-profile omlx
- Press
/model inside the TUI.
- Observe that the model table shows
Copilot in the PROVIDER column and the status bar shows Copilot:KAT Coder V2.5 Dev OptiQ 4bit.
- Selecting the model results in:
Error: Model copilot:KAT-Coder-V2.5-Dev-OptiQ-4bit not found.
Expected Behavior
Models from custom openai-compatible profiles should be tagged with their configured profile name (omlx) or the generic openai-compatible label in the picker, and the model ID should be passed cleanly to the runtime without the copilot: prefix.
Actual Behavior
The picker merges custom profile models into a catalog that incorrectly inherits the copilot provider label from ProviderChoice::Copilot.
Code Location
src/cli/provider_init.rs: Defines ProviderChoice::Copilot => "copilot" and handles OpenaiCompatible registration via resolve_openai_compatible_profile.
src/cli/provider_init.rs:1811: init_provider_and_registry likely performs the catalog merge.
crates/jcode-tui/src/tui/info_widget_model.rs (or related TUI picker components): Renders the table with the incorrect PROVIDER column.
Environment
- jcode v0.64.2 (6c6fbba)
- macOS
- Custom
openai-compatible profile pointing to local MLX server.
Bug Report: Custom
openai-compatiblemodels incorrectly tagged withcopilot:prefix in model pickerSummary
When using custom
openai-compatibleproviders (e.g., local MLX servers via theomlxprofile), the/modelpicker incorrectly labels the models withPROVIDER = Copilotand constructs internal model IDs with thecopilot:prefix (e.g.,copilot:KAT-Coder-V2.5-Dev-OptiQ-4bit). This causes "model not found" errors when selecting the model.Reproduction
~/.jcode/config.toml:jcode --provider-profile omlx/modelinside the TUI.Copilotin the PROVIDER column and the status bar showsCopilot:KAT Coder V2.5 Dev OptiQ 4bit.Error: Model copilot:KAT-Coder-V2.5-Dev-OptiQ-4bit not found.Expected Behavior
Models from custom
openai-compatibleprofiles should be tagged with their configured profile name (omlx) or the genericopenai-compatiblelabel in the picker, and the model ID should be passed cleanly to the runtime without thecopilot:prefix.Actual Behavior
The picker merges custom profile models into a catalog that incorrectly inherits the
copilotprovider label fromProviderChoice::Copilot.Code Location
src/cli/provider_init.rs: DefinesProviderChoice::Copilot => "copilot"and handlesOpenaiCompatibleregistration viaresolve_openai_compatible_profile.src/cli/provider_init.rs:1811:init_provider_and_registrylikely performs the catalog merge.crates/jcode-tui/src/tui/info_widget_model.rs(or related TUI picker components): Renders the table with the incorrect PROVIDER column.Environment
openai-compatibleprofile pointing to local MLX server.