feat(auth): added auth-gateway forward-proxy and broker usage/migrate endpoints
- Added `omp auth-gateway serve/token/status` — a forward-proxy injecting broker credentials for OpenAI Chat, Anthropic Messages, and OpenAI Responses wire formats. - Added `GET /v1/usage` to auth-broker and auth-gateway; usage cache switched to 5-min per-credential TTL with jitter and last-good fallback on failure. - Added `AuthStorage.setConfigApiKey/removeConfigApiKey/clearConfigApiKeys` so `models.yml` `apiKey` beats OAuth tokens without overriding `--api-key`. - Added `omp auth-broker migrate --from-local` for idempotent upload of local SQLite/env credentials to the broker.
This commit is contained in:
@@ -17,7 +17,7 @@ const SEPARATORS = ["~", "%", "÷", ">", ":"] as const;
|
||||
const MODELS = [
|
||||
"openrouter/z-ai/glm-4.7:nitro",
|
||||
"openai/gpt-5.4-nano",
|
||||
"p-anthropic/claude-sonnet-4-6",
|
||||
"anthropic/claude-sonnet-4-6",
|
||||
] as const;
|
||||
|
||||
const CONCURRENCY = 3;
|
||||
|
||||
@@ -205,8 +205,7 @@ function fmtNum(value: number): string {
|
||||
}
|
||||
|
||||
function shortModel(model: string): string {
|
||||
const cleaned = model.replace(/^p-anthropic\//, "anthropic/");
|
||||
const segs = cleaned.split("/");
|
||||
const segs = model.split("/");
|
||||
return segs[segs.length - 1].replace(/:nitro/, "");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user