Problem
The plugin renders model.name in the OpenCode model picker (plugin.ts:789). When multiple OmniRoute providers serve the same base model, they all return the same name value — e.g. four providers all return name: "GPT-5.5" for their respective gpt-5.5 entry.
This leaves the user with a picker full of identical display names and no way to tell which provider they are selecting.
Proposed fix
Add a modelNameDisplay option to OmniRouteConfig:
| Value |
Display name shown |
"name" (default) |
name field from /v1/models — unchanged behaviour |
"id" |
id field from /v1/models — always unique per entry |
When set to "id", the picker shows "gh/gpt-5.5", "cx/gpt-5.5" etc., making all entries distinguishable regardless of the server-side name.
Usage
// opencode.js
import OmniRouteAuthPlugin from 'opencode-omniroute-auth';
export default {
plugins: [OmniRouteAuthPlugin],
provider: {
omniroute: {
options: {
baseURL: 'http://localhost:20128/v1',
modelNameDisplay: 'id', // show "gh/gpt-5.5" instead of "GPT-5.5"
},
},
},
};
Relationship to server-side fix
A complementary server-side fix (diegosouzapw/OmniRoute#4516 / diegosouzapw/OmniRoute#4517) qualifies ambiguous model names on the server. The client-side option is still useful for older OmniRoute versions or when the user prefers raw IDs unconditionally.
Related
Problem
The plugin renders
model.namein the OpenCode model picker (plugin.ts:789). When multiple OmniRoute providers serve the same base model, they all return the samenamevalue — e.g. four providers all returnname: "GPT-5.5"for their respectivegpt-5.5entry.This leaves the user with a picker full of identical display names and no way to tell which provider they are selecting.
Proposed fix
Add a
modelNameDisplayoption toOmniRouteConfig:"name"(default)namefield from/v1/models— unchanged behaviour"id"idfield from/v1/models— always unique per entryWhen set to
"id", the picker shows"gh/gpt-5.5","cx/gpt-5.5"etc., making all entries distinguishable regardless of the server-side name.Usage
Relationship to server-side fix
A complementary server-side fix (diegosouzapw/OmniRoute#4516 / diegosouzapw/OmniRoute#4517) qualifies ambiguous model names on the server. The client-side option is still useful for older OmniRoute versions or when the user prefers raw IDs unconditionally.
Related