fix(openai): clarify auth routes in picker and docs

This commit is contained in:
Peter Steinberger
2026-04-06 16:14:38 +01:00
parent 2b6e08bbfa
commit 0c5e6037b0
4 changed files with 96 additions and 0 deletions

View File

@@ -115,6 +115,17 @@ function normalizeModelKeys(values: string[]): string[] {
return next;
}
function resolveModelRouteHint(provider: string): string | undefined {
const normalized = normalizeProviderId(provider);
if (normalized === "openai") {
return "API key route";
}
if (normalized === "openai-codex") {
return "ChatGPT OAuth route";
}
return undefined;
}
function addModelSelectOption(params: {
entry: {
provider: string;
@@ -146,6 +157,10 @@ function addModelSelectOption(params: {
if (aliases?.length) {
hints.push(`alias: ${aliases.join(", ")}`);
}
const routeHint = resolveModelRouteHint(params.entry.provider);
if (routeHint) {
hints.push(routeHint);
}
if (!params.hasAuth(params.entry.provider)) {
hints.push("auth missing");
}