opencode icon indicating copy to clipboard operation
opencode copied to clipboard

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

Open athrunsun opened this issue 1 month ago • 6 comments

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

athrunsun avatar Jan 04 '26 02:01 athrunsun

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] avatar Jan 04 '26 02:01 github-actions[bot]

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 avatar Jan 04 '26 02:01 athrunsun

I have the same problem too.

FurryWolfX avatar Jan 04 '26 13:01 FurryWolfX

The same issue

kvokka avatar Jan 05 '26 17:01 kvokka

The same issue

jungminjo-PMA avatar Jan 07 '26 06:01 jungminjo-PMA

The same issue

shahidshabbir-se avatar Jan 08 '26 13:01 shahidshabbir-se

The same issue

faiz-gear avatar Jan 08 '26 15:01 faiz-gear

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

ajanvrin avatar Jan 08 '26 16:01 ajanvrin

The same issue in latest version 1.1.23

senro avatar Jan 16 '26 07:01 senro