Skip to content

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

Closed

Description

@athrunsun

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

Activity

  1. github-actions commented on Jan 4, 2026

    @github-actions
    Contributor

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

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

  2. athrunsun commented on Jan 4, 2026

    @athrunsun
    Author

    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.

  3. FurryWolfX commented on Jan 4, 2026

    @FurryWolfX

    I have the same problem too.

  4. kvokka commented on Jan 5, 2026

    @kvokka

    The same issue

  5. jungminjo-PMA commented on Jan 7, 2026

    @jungminjo-PMA

    The same issue

  6. shahidshabbir-se commented on Jan 8, 2026

    @shahidshabbir-se

    The same issue

  7. faiz-gear commented on Jan 8, 2026

    @faiz-gear

    The same issue

  8. ajanvrin commented on Jan 8, 2026

    @ajanvrin

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

  9. added 2 commits that reference this issue on Jan 8, 2026
    92f191b
    22cf996
  10. senro commented on Jan 16, 2026

    @senro

    The same issue in latest version 1.1.23

  11. ajnart commented on May 7, 2026

    @ajnart

    @adamdotdevin sorry for the ping but why was this closed? I am having this issue right now on the latest version. Same thing the webui works but not the tui.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

webRelates to opencode on web / desktop

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions