Unable to choose from all of the custom models in the web UI #4146

Closed
opened 2026-02-16 17:42:47 -05:00 by yindo · 9 comments
Owner

Originally created by @athrunsun on GitHub (Jan 3, 2026).

Originally assigned to: @adamdotdevin on GitHub.

Question

opencode version: 1.0.220

Problem: I'm not able to choose from all of the custom models in the web UI.

Here is my config (~/.config/opencode/opencode.json):

{
  "$schema": "https://opencode.ai/config.json",
  "model": "openrouter-custom/openai/gpt-5.2",
  "small_model": "openrouter-custom/google/gemini-3-flash-preview",
  "provider": {
    "deepseek-custom": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "deepseek-custom",
      "options": {
        "baseURL": "https://api.deepseek.com/v1",
        "apiKey": "{env:DEEPSEEK_API_KEY}"
      },
      "models": {
        "deepseek-chat": {
          "name": "deepseek-chat",
          "cost": {
            "input": 2,
            "output": 3,
            "cache_read": 0.2,
            "cache_write": 3
          },
          "limit": {
            "context": 128000,
            "output": 8000
          }
        }
      }
    },
    "aliyun": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "aliyun",
      "options": {
        "baseURL": "https://dashscope.aliyuncs.com/compatible-mode/v1",
        "apiKey": "{env:BAILIAN_API_KEY}"
      },
      "models": {
        "qwen3-max": {
          "name": "qwen3-max",
          "cost": {
            "input": 10,
            "output": 40,
            "cache_read": 10,
            "cache_write": 40
          },
          "limit": {
            "context": 262144,
            "output": 65536
          }
        },
        "qwen3-coder-plus": {
          "name": "qwen3-coder-plus",
          "cost": {
            "input": 6,
            "output": 24,
            "cache_read": 6,
            "cache_write": 24
          },
          "limit": {
            "context": 1000000,
            "output": 65536
          }
        },
        "qwen3-coder-480b-a35b-instruct": {
          "name": "qwen3-coder-480b-a35b-instruct",
          "cost": {
            "input": 6,
            "output": 24,
            "cache_read": 6,
            "cache_write": 24
          },
          "limit": {
            "context": 262144,
            "output": 65536
          }
        },
        "deepseek-v3.2": {
          "name": "deepseek-v3.2",
          "cost": {
            "input": 2,
            "output": 3,
            "cache_read": 2,
            "cache_write": 3
          },
          "limit": {
            "context": 131072,
            "output": 65536
          }
        },
        "glm-4.7": {
          "name": "glm-4.7",
          "cost": {
            "input": 3,
            "output": 14,
            "cache_read": 3,
            "cache_write": 14
          },
          "limit": {
            "context": 202752,
            "output": 16384
          }
        }
      }
    },
    "openrouter-custom": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "openrouter-custom",
      "options": {
        "baseURL": "https://openrouter.ai/api/v1",
        "apiKey": "{env:OPENROUTER_API_KEY}"
      },
      "models": {
        "openai/gpt-5": {
          "name": "openai/gpt-5",
          "cost": {
            "input": 1.25,
            "output": 10,
            "cache_read": 0.125
          },
          "limit": {
            "context": 400000,
            "output": 128000
          }
        },
        "openai/gpt-5.2": {
          "name": "openai/gpt-5.2",
          "cost": {
            "input": 1.75,
            "output": 14,
            "cache_read": 0.175
          },
          "limit": {
            "context": 400000,
            "output": 128000
          }
        },
        "google/gemini-2.5-pro": {
          "name": "google/gemini-2.5-pro",
          "cost": {
            "input": 1.25,
            "output": 10,
            "cache_read": 0.31,
            "cache_write": 1.625
          },
          "limit": {
            "context": 1048576,
            "output": 65536
          }
        },
        "google/gemini-2.5-flash": {
          "name": "google/gemini-2.5-flash",
          "cost": {
            "input": 0.3,
            "output": 2.5,
            "cache_read": 0.075,
            "cache_write": 0.383
          },
          "limit": {
            "context": 1048576,
            "output": 65536
          }
        },
        "google/gemini-3-flash-preview": {
          "name": "google/gemini-3-flash-preview",
          "cost": {
            "input": 0.5,
            "output": 3,
            "cache_read": 0.05,
            "cache_write": 3
          },
          "limit": {
            "context": 1048576,
            "output": 65536
          }
        },
        "deepseek/deepseek-v3.2": {
          "name": "deepseek/deepseek-v3.2",
          "cost": {
            "input": 0.25,
            "output": 0.38,
            "cache_read": 0.25,
            "cache_write": 0.38
          },
          "limit": {
            "context": 163840,
            "output": 163840
          }
        },
        "qwen/qwen3-max": {
          "name": "qwen/qwen3-max",
          "cost": {
            "input": 1.2,
            "output": 6,
            "cache_read": 0.24,
            "cache_write": 6
          },
          "limit": {
            "context": 256000,
            "output": 32800
          }
        },
        "qwen/qwen3-coder-plus": {
          "name": "qwen/qwen3-coder-plus",
          "cost": {
            "input": 1,
            "output": 5,
            "cache_read": 0.1,
            "cache_write": 5
          },
          "limit": {
            "context": 128000,
            "output": 65536
          }
        },
        "z-ai/glm-4.6": {
          "name": "z-ai/glm-4.6",
          "cost": {
            "input": 0.6,
            "output": 2.2,
            "cache_read": 0.6,
            "cache_write": 2.2
          },
          "limit": {
            "context": 200000,
            "output": 128000
          }
        },
        "z-ai/glm-4.7": {
          "name": "z-ai/glm-4.7",
          "cost": {
            "input": 0.4,
            "output": 1.5,
            "cache_read": 0.4,
            "cache_write": 1.5
          },
          "limit": {
            "context": 202752,
            "output": 131100
          }
        }
      }
    }
  }
}

I launched opencode under my project path (just opencode), then opened web UI. I'm able to switch model in the TUI and I can choose from all of the custom models:

Image

But I'm not able to choose from all of the custom models in the web UI (but the ones that are ever used in the TUI):

Image
Originally created by @athrunsun on GitHub (Jan 3, 2026). Originally assigned to: @adamdotdevin on GitHub. ### Question opencode version: 1.0.220 Problem: I'm not able to choose from all of the custom models in the web UI. Here is my config (`~/.config/opencode/opencode.json`): ```json { "$schema": "https://opencode.ai/config.json", "model": "openrouter-custom/openai/gpt-5.2", "small_model": "openrouter-custom/google/gemini-3-flash-preview", "provider": { "deepseek-custom": { "npm": "@ai-sdk/openai-compatible", "name": "deepseek-custom", "options": { "baseURL": "https://api.deepseek.com/v1", "apiKey": "{env:DEEPSEEK_API_KEY}" }, "models": { "deepseek-chat": { "name": "deepseek-chat", "cost": { "input": 2, "output": 3, "cache_read": 0.2, "cache_write": 3 }, "limit": { "context": 128000, "output": 8000 } } } }, "aliyun": { "npm": "@ai-sdk/openai-compatible", "name": "aliyun", "options": { "baseURL": "https://dashscope.aliyuncs.com/compatible-mode/v1", "apiKey": "{env:BAILIAN_API_KEY}" }, "models": { "qwen3-max": { "name": "qwen3-max", "cost": { "input": 10, "output": 40, "cache_read": 10, "cache_write": 40 }, "limit": { "context": 262144, "output": 65536 } }, "qwen3-coder-plus": { "name": "qwen3-coder-plus", "cost": { "input": 6, "output": 24, "cache_read": 6, "cache_write": 24 }, "limit": { "context": 1000000, "output": 65536 } }, "qwen3-coder-480b-a35b-instruct": { "name": "qwen3-coder-480b-a35b-instruct", "cost": { "input": 6, "output": 24, "cache_read": 6, "cache_write": 24 }, "limit": { "context": 262144, "output": 65536 } }, "deepseek-v3.2": { "name": "deepseek-v3.2", "cost": { "input": 2, "output": 3, "cache_read": 2, "cache_write": 3 }, "limit": { "context": 131072, "output": 65536 } }, "glm-4.7": { "name": "glm-4.7", "cost": { "input": 3, "output": 14, "cache_read": 3, "cache_write": 14 }, "limit": { "context": 202752, "output": 16384 } } } }, "openrouter-custom": { "npm": "@ai-sdk/openai-compatible", "name": "openrouter-custom", "options": { "baseURL": "https://openrouter.ai/api/v1", "apiKey": "{env:OPENROUTER_API_KEY}" }, "models": { "openai/gpt-5": { "name": "openai/gpt-5", "cost": { "input": 1.25, "output": 10, "cache_read": 0.125 }, "limit": { "context": 400000, "output": 128000 } }, "openai/gpt-5.2": { "name": "openai/gpt-5.2", "cost": { "input": 1.75, "output": 14, "cache_read": 0.175 }, "limit": { "context": 400000, "output": 128000 } }, "google/gemini-2.5-pro": { "name": "google/gemini-2.5-pro", "cost": { "input": 1.25, "output": 10, "cache_read": 0.31, "cache_write": 1.625 }, "limit": { "context": 1048576, "output": 65536 } }, "google/gemini-2.5-flash": { "name": "google/gemini-2.5-flash", "cost": { "input": 0.3, "output": 2.5, "cache_read": 0.075, "cache_write": 0.383 }, "limit": { "context": 1048576, "output": 65536 } }, "google/gemini-3-flash-preview": { "name": "google/gemini-3-flash-preview", "cost": { "input": 0.5, "output": 3, "cache_read": 0.05, "cache_write": 3 }, "limit": { "context": 1048576, "output": 65536 } }, "deepseek/deepseek-v3.2": { "name": "deepseek/deepseek-v3.2", "cost": { "input": 0.25, "output": 0.38, "cache_read": 0.25, "cache_write": 0.38 }, "limit": { "context": 163840, "output": 163840 } }, "qwen/qwen3-max": { "name": "qwen/qwen3-max", "cost": { "input": 1.2, "output": 6, "cache_read": 0.24, "cache_write": 6 }, "limit": { "context": 256000, "output": 32800 } }, "qwen/qwen3-coder-plus": { "name": "qwen/qwen3-coder-plus", "cost": { "input": 1, "output": 5, "cache_read": 0.1, "cache_write": 5 }, "limit": { "context": 128000, "output": 65536 } }, "z-ai/glm-4.6": { "name": "z-ai/glm-4.6", "cost": { "input": 0.6, "output": 2.2, "cache_read": 0.6, "cache_write": 2.2 }, "limit": { "context": 200000, "output": 128000 } }, "z-ai/glm-4.7": { "name": "z-ai/glm-4.7", "cost": { "input": 0.4, "output": 1.5, "cache_read": 0.4, "cache_write": 1.5 }, "limit": { "context": 202752, "output": 131100 } } } } } } ``` I launched opencode under my project path (just `opencode`), then opened web UI. I'm able to switch model in the TUI and I can choose from all of the custom models: <img width="1644" height="1172" alt="Image" src="https://github.com/user-attachments/assets/757f28c1-ff65-4f47-ad37-51d54a730b35" /> But I'm not able to choose from all of the custom models in the web UI (but the ones that are ever used in the TUI): <img width="1262" height="972" alt="Image" src="https://github.com/user-attachments/assets/855698ed-fd0a-4c6c-9e57-f0271a604b1b" />
yindo added the web label 2026-02-16 17:42:47 -05:00
yindo closed this issue 2026-02-16 17:42:47 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 3, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #6169: /model TUI picker does not display all custom provider models - Similar report where custom provider models load correctly but don't appear in the UI selector, though that report is specifically about the TUI picker

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 3, 2026): This issue might be a duplicate of existing issues. Please check: - #6169: /model TUI picker does not display all custom provider models - Similar report where custom provider models load correctly but don't appear in the UI selector, though that report is specifically about the TUI picker Feel free to ignore if none of these address your specific case.
Author
Owner

@athrunsun commented on GitHub (Jan 3, 2026):

This issue might be a duplicate of existing issues. Please check:

Feel free to ignore if none of these address your specific case.

No, my problem is about the web UI, not the TUI.

@athrunsun commented on GitHub (Jan 3, 2026): > This issue might be a duplicate of existing issues. Please check: > > * [/model TUI picker does not display all custom provider models (models load correctly but don't appear in UI) #6169](https://github.com/anomalyco/opencode/issues/6169): /model TUI picker does not display all custom provider models - Similar report where custom provider models load correctly but don't appear in the UI selector, though that report is specifically about the TUI picker > > Feel free to ignore if none of these address your specific case. No, my problem is about the web UI, not the TUI.
Author
Owner

@FurryWolfX commented on GitHub (Jan 4, 2026):

I have the same problem too.

@FurryWolfX commented on GitHub (Jan 4, 2026): I have the same problem too.
Author
Owner

@kvokka commented on GitHub (Jan 5, 2026):

The same issue

@kvokka commented on GitHub (Jan 5, 2026): The same issue
Author
Owner

@jungminjo-PMA commented on GitHub (Jan 7, 2026):

The same issue

@jungminjo-PMA commented on GitHub (Jan 7, 2026): The same issue
Author
Owner

@shahidshabbir-se commented on GitHub (Jan 8, 2026):

The same issue

@shahidshabbir-se commented on GitHub (Jan 8, 2026): The same issue
Author
Owner

@faiz-gear commented on GitHub (Jan 8, 2026):

The same issue

@faiz-gear commented on GitHub (Jan 8, 2026): The same issue
Author
Owner

@ajanvrin commented on GitHub (Jan 8, 2026):

Can confirm as well. Listing custom models work in the TUI, but not on the Web UI

@ajanvrin commented on GitHub (Jan 8, 2026): Can confirm as well. Listing custom models work in the TUI, but not on the Web UI
Author
Owner

@senro commented on GitHub (Jan 16, 2026):

The same issue in latest version 1.1.23

@senro commented on GitHub (Jan 16, 2026): The same issue in latest version 1.1.23
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4146