Repository navigation
Closed
Labels
autonomous: likelyProbably hands-off: clearly worth fixing, agent can do it, minor judgment needed.bugSomething isn't workingpriority: highP1 - important bug or impactful feature, fix soontriage: fixed-pending-releaseFixed in code/committed; will close automatically on next releasetriage: reproducibleClear repro + clear fix path
Description
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
/modelinside the TUI. - Observe that the model table shows
Copilotin the PROVIDER column and the status bar showsCopilot: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: 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
- jcode v0.64.2 (6c6fbba)
- macOS
- Custom
openai-compatibleprofile pointing to local MLX server.
Metadata
Metadata
Assignees
Labels
autonomous: likelyProbably hands-off: clearly worth fixing, agent can do it, minor judgment needed.bugSomething isn't workingpriority: highP1 - important bug or impactful feature, fix soontriage: fixed-pending-releaseFixed in code/committed; will close automatically on next releasetriage: reproducibleClear repro + clear fix path
Activity
1jehuang commentedon Aug 1, 2026
Thanks, the report pinned this down well. Root cause: route resolution for bare model ids only consulted the built-in openai-compatible profiles, never user-defined
[providers.<name>]entries from config.toml. Youromlxmodel matched no known provider, so it fell through to the Copilot heuristic, which labelled it Copilot and built acopilot:<model>id nothing could resolve.Fixed in #701: named config profiles are now consulted during route resolution, so the model shows PROVIDER = omlx with api_method
openai-compatible:omlx. Tests added.--- — Jcode agent (automated triage), on behalf of @1jehuang
fix(provider): route custom openai-compatible profile models to their…
test(provider): cover custom config profile routing end to end (refs #…
chore: rebaseline size ratchets for triage test additions (refs #694, #…
1jehuang commentedon Aug 1, 2026
Update: the fix is merged to master (#701). Follow-up end-to-end tests are in #702. It will ship in the next release.
--- — Jcode agent (automated triage), on behalf of @1jehuang
test: cover the remote key path and both model-route sources (refs #694…
test(provider): cover custom config profile routing end to end (refs 1…
chore: rebaseline size ratchets for triage test additions (refs 1jehu…
test: cover the remote key path and both model-route sources (refs 1j…
14 remaining items
fix(provider): route custom openai-compatible profile models to their…
test(provider): cover custom config profile routing end to end (refs 1…
chore: rebaseline size ratchets for triage test additions (refs 1jehu…
test: cover the remote key path and both model-route sources (refs 1j…
fix(provider): route custom openai-compatible profile models to their…
test(provider): cover custom config profile routing end to end (refs 1…
chore: rebaseline size ratchets for triage test additions (refs 1jehu…
test: cover the remote key path and both model-route sources (refs 1j…
fix(provider): route custom openai-compatible profile models to their…
test(provider): cover custom config profile routing end to end (refs 1…
chore: rebaseline size ratchets for triage test additions (refs 1jehu…
test: cover the remote key path and both model-route sources (refs 1j…
test(provider): cover custom config profile routing end to end (refs 1…
test: cover the remote key path and both model-route sources (refs 1j…
test: triage verification coverage for 1jehuang#694, 1jehuang#695, 1j…