mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-14 10:41:23 +00:00
fix(openai): clarify auth routes in picker and docs
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user