refactor(open-sse): registry consolidation + DRY media/oauth/adhoc cleanup
- Single-source registry: oauth clientId/tokenUrl, usage URLs, image/embed configs, search defaultModel, codex fixedPort, google token url derive. - Remove 29 unused OmniRoute providers (registry 100→71); media intact. - De-adhoc: codex literals → registry format/oauth flags; reasoningInject, image/embed openrouter headers + xai bodyFields config-driven. - Add REGISTRY_TEMPLATE.js + expand PROVIDER_DEFAULTS/schema JSDoc. - Baselines updated; PROVIDERS 62 + alias 90 byte-for-byte, golden snapshots. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -3,13 +3,40 @@ import { CLAUDE_CLI_SPOOF_HEADERS } from "../shared.js";
|
||||
export default {
|
||||
id: "claude",
|
||||
alias: "cc",
|
||||
display: {
|
||||
"name": "Claude Code",
|
||||
"icon": "smart_toy",
|
||||
"color": "#D97757",
|
||||
"website": "https://claude.ai",
|
||||
"notice": {
|
||||
"signupUrl": "https://claude.ai"
|
||||
},
|
||||
"deprecated": true,
|
||||
"deprecationNotice": "RISK_NOTICE"
|
||||
},
|
||||
category: "oauth",
|
||||
uiAlias: "cc",
|
||||
transport: {
|
||||
baseUrl: "https://api.anthropic.com/v1/messages",
|
||||
format: "claude",
|
||||
urlSuffix: "?beta=true",
|
||||
headers: { ...CLAUDE_CLI_SPOOF_HEADERS },
|
||||
quirks: { cloakToolsOnOAuth: true },
|
||||
auth: {"apiKey":{"header":"x-api-key","scheme":"raw"},"oauth":{"header":"Authorization","scheme":"bearer"},"hooks":["claudeOverlay"]},
|
||||
usage: {
|
||||
oauthUrl: "https://api.anthropic.com/api/oauth/usage",
|
||||
orgUrl: "https://api.anthropic.com/v1/organizations/{org_id}/usage",
|
||||
settingsUrl: "https://api.anthropic.com/v1/settings"
|
||||
},
|
||||
},
|
||||
oauth: {
|
||||
clientId: "9d1c250a-e61b-44d9-88ed-5944d1962f5e",
|
||||
tokenUrl: "https://api.anthropic.com/v1/oauth/token"
|
||||
authorizeUrl: "https://claude.ai/oauth/authorize",
|
||||
tokenUrl: "https://api.anthropic.com/v1/oauth/token",
|
||||
scopes: ["org:create_api_key", "user:profile", "user:inference"],
|
||||
codeChallengeMethod: "S256",
|
||||
refreshLeadMs: 14400000,
|
||||
refresh: {"encoding":"json"}
|
||||
},
|
||||
models: [
|
||||
{ id: "claude-opus-4-8", name: "Claude Opus 4.8" },
|
||||
@@ -19,5 +46,6 @@ export default {
|
||||
{ id: "claude-opus-4-5-20251101", name: "Claude 4.5 Opus" },
|
||||
{ id: "claude-sonnet-4-5-20250929", name: "Claude 4.5 Sonnet" },
|
||||
{ id: "claude-haiku-4-5-20251001", name: "Claude 4.5 Haiku" }
|
||||
]
|
||||
],
|
||||
features: {"usage":true},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user