Merge remote-tracking branch 'upstream/master'
# Conflicts: # .gitignore # open-sse/handlers/chatCore.js
This commit is contained in:
@@ -186,6 +186,8 @@ export const PATTERN_CAPABILITIES = [
|
||||
// ── Grok (vision + Live Search) ──────────────────────────────────
|
||||
{ pattern: "*grok*image*", caps: { imageOutput: true } },
|
||||
{ pattern: "*grok-code*", caps: { reasoning: true, thinkingFormat: "openai", contextWindow: 256000 } },
|
||||
// Grok 4.5 (Grok CLI / Grok Build): 500k context per cli-chat-proxy /v1/models
|
||||
{ pattern: "*grok-4.5*", caps: { vision: true, reasoning: true, search: true, thinkingFormat: "openai", contextWindow: 500000, maxOutput: 64000 } },
|
||||
{ pattern: "*grok-4*", caps: { vision: true, reasoning: true, search: true, thinkingFormat: "openai", contextWindow: 256000 } },
|
||||
{ pattern: "*grok-3*", caps: { vision: true, reasoning: true, search: true, thinkingFormat: "openai", contextWindow: 131072 } },
|
||||
{ pattern: "*grok*", caps: { vision: true, reasoning: true, search: true, thinkingFormat: "openai", contextWindow: 256000 } },
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
import { deriveModelName } from "./namePatterns.js";
|
||||
|
||||
// Normalize version separators in a model id: hyphen between two digits becomes a dot.
|
||||
// Registry ids use dots for versions ("claude-sonnet-4.5") but clients (CLIs, aliases)
|
||||
// often send them with dashes ("claude-sonnet-4-5"). Only digit-digit hyphens are
|
||||
// touched, so word/suffix hyphens stay intact ("-thinking", "-agentic", "qwen3-coder-next").
|
||||
export function normalizeModelId(modelId) {
|
||||
if (typeof modelId !== "string") return modelId;
|
||||
return modelId.replace(/(\d)-(\d)/g, "$1.$2");
|
||||
}
|
||||
|
||||
// Model defaults centralized (was scattered as `m.kind || "llm"`, `quotaFamily || "normal"`, etc.)
|
||||
export const MODEL_DEFAULTS = {
|
||||
kind: "llm",
|
||||
|
||||
@@ -28,6 +28,7 @@ export const MODEL_PRICING = {
|
||||
"claude-sonnet-4.6": { input: 3.00, output: 15.00, cached: 0.30, reasoning: 22.50, cache_creation: 3.00 },
|
||||
"claude-opus-4-5-thinking": { input: 5.00, output: 25.00, cached: 0.50, reasoning: 37.50, cache_creation: 5.00 },
|
||||
"claude-opus-4-6-thinking": { input: 5.00, output: 25.00, cached: 0.50, reasoning: 37.50, cache_creation: 5.00 },
|
||||
"claude-fable-5": { input: 10.00, output: 50.00, cached: 1.00, reasoning: 50.00, cache_creation: 12.50 },
|
||||
|
||||
// === OpenAI / GPT ===
|
||||
"gpt-3.5-turbo": { input: 0.50, output: 1.50, cached: 0.25, reasoning: 2.25, cache_creation: 0.50 },
|
||||
@@ -36,22 +37,22 @@ export const MODEL_PRICING = {
|
||||
"gpt-4o": { input: 2.50, output: 10.00, cached: 1.25, reasoning: 15.00, cache_creation: 2.50 },
|
||||
"gpt-4o-mini": { input: 0.15, output: 0.60, cached: 0.075, reasoning: 0.90, cache_creation: 0.15 },
|
||||
"gpt-4.1": { input: 2.50, output: 10.00, cached: 1.25, reasoning: 15.00, cache_creation: 2.50 },
|
||||
"gpt-5": { input: 3.00, output: 12.00, cached: 1.50, reasoning: 18.00, cache_creation: 3.00 },
|
||||
"gpt-5-mini": { input: 0.75, output: 3.00, cached: 0.375, reasoning: 4.50, cache_creation: 0.75 },
|
||||
"gpt-5-codex": { input: 3.00, output: 12.00, cached: 1.50, reasoning: 18.00, cache_creation: 3.00 },
|
||||
"gpt-5.1": { input: 4.00, output: 16.00, cached: 2.00, reasoning: 24.00, cache_creation: 4.00 },
|
||||
"gpt-5.1-codex": { input: 4.00, output: 16.00, cached: 2.00, reasoning: 24.00, cache_creation: 4.00 },
|
||||
"gpt-5": { input: 1.25, output: 10.00, cached: 0.625, reasoning: 10.00, cache_creation: 1.25 },
|
||||
"gpt-5-mini": { input: 0.25, output: 2.00, cached: 0.125, reasoning: 2.00, cache_creation: 0.25 },
|
||||
"gpt-5-codex": { input: 1.25, output: 10.00, cached: 0.625, reasoning: 10.00, cache_creation: 1.25 },
|
||||
"gpt-5.1": { input: 1.25, output: 10.00, cached: 0.625, reasoning: 10.00, cache_creation: 1.25 },
|
||||
"gpt-5.1-codex": { input: 1.25, output: 10.00, cached: 0.625, reasoning: 10.00, cache_creation: 1.25 },
|
||||
"gpt-5.1-codex-mini": { input: 1.50, output: 6.00, cached: 0.75, reasoning: 9.00, cache_creation: 1.50 },
|
||||
"gpt-5.1-codex-mini-high": { input: 2.00, output: 8.00, cached: 1.00, reasoning: 12.00, cache_creation: 2.00 },
|
||||
"gpt-5.1-codex-max": { input: 8.00, output: 32.00, cached: 4.00, reasoning: 48.00, cache_creation: 8.00 },
|
||||
"gpt-5.2": { input: 5.00, output: 20.00, cached: 2.50, reasoning: 30.00, cache_creation: 5.00 },
|
||||
"gpt-5.2-codex": { input: 5.00, output: 20.00, cached: 2.50, reasoning: 30.00, cache_creation: 5.00 },
|
||||
"gpt-5.3-codex": { input: 6.00, output: 24.00, cached: 3.00, reasoning: 36.00, cache_creation: 6.00 },
|
||||
"gpt-5.3-codex-xhigh": { input: 10.00, output: 40.00, cached: 5.00, reasoning: 60.00, cache_creation: 10.00 },
|
||||
"gpt-5.3-codex-high": { input: 8.00, output: 32.00, cached: 4.00, reasoning: 48.00, cache_creation: 8.00 },
|
||||
"gpt-5.3-codex-low": { input: 4.00, output: 16.00, cached: 2.00, reasoning: 24.00, cache_creation: 4.00 },
|
||||
"gpt-5.3-codex-none": { input: 3.00, output: 12.00, cached: 1.50, reasoning: 18.00, cache_creation: 3.00 },
|
||||
"gpt-5.2": { input: 1.75, output: 14.00, cached: 0.175, reasoning: 14.00, cache_creation: 1.75 },
|
||||
"gpt-5.2-codex": { input: 1.75, output: 14.00, cached: 0.175, reasoning: 14.00, cache_creation: 1.75 },
|
||||
"gpt-5.3-codex": { input: 1.75, output: 14.00, cached: 0.175, reasoning: 14.00, cache_creation: 1.75 },
|
||||
"gpt-5.3-codex-spark": { input: 3.00, output: 12.00, cached: 0.30, reasoning: 12.00, cache_creation: 3.00 },
|
||||
"gpt-5.6": { input: 2.50, output: 15.00, cached: 0.25, reasoning: 15.00, cache_creation: 2.50 },
|
||||
"gpt-5.6-luna": { input: 1.00, output: 6.00, cached: 0.10, reasoning: 6.00, cache_creation: 1.00 },
|
||||
"gpt-5.6-terra": { input: 2.50, output: 15.00, cached: 0.25, reasoning: 15.00, cache_creation: 2.50 },
|
||||
"gpt-5.6-sol": { input: 5.00, output: 30.00, cached: 0.50, reasoning: 30.00, cache_creation: 5.00 },
|
||||
"o1": { input: 15.00, output: 60.00, cached: 7.50, reasoning: 90.00, cache_creation: 15.00 },
|
||||
"o1-mini": { input: 3.00, output: 12.00, cached: 1.50, reasoning: 18.00, cache_creation: 3.00 },
|
||||
|
||||
@@ -122,7 +123,7 @@ export const MODEL_PRICING = {
|
||||
* Keyed by provider alias (cc, cx, gc, gh, ...) or provider id (openai, anthropic, ...).
|
||||
*/
|
||||
export const PROVIDER_PRICING = {
|
||||
// GitHub Copilot (gh) — gpt-5.3-codex has different rate than canonical
|
||||
// GitHub Copilot (gh) — explicit override, matches canonical gpt-5.3-codex rate
|
||||
gh: {
|
||||
"gpt-5.3-codex": { input: 1.75, output: 14.00, cached: 0.175, reasoning: 14.00, cache_creation: 1.75 },
|
||||
},
|
||||
@@ -140,11 +141,11 @@ export const PATTERN_PRICING = [
|
||||
{ pattern: "*-codex-max", pricing: { input: 8.00, output: 32.00, cached: 4.00, reasoning: 48.00, cache_creation: 8.00 } },
|
||||
{ pattern: "*-codex-mini-*", pricing: { input: 1.50, output: 6.00, cached: 0.75, reasoning: 9.00, cache_creation: 1.50 } },
|
||||
{ pattern: "*-codex-mini", pricing: { input: 1.50, output: 6.00, cached: 0.75, reasoning: 9.00, cache_creation: 1.50 } },
|
||||
{ pattern: "*-codex-low", pricing: { input: 4.00, output: 16.00, cached: 2.00, reasoning: 24.00, cache_creation: 4.00 } },
|
||||
{ pattern: "*-codex-none", pricing: { input: 3.00, output: 12.00, cached: 1.50, reasoning: 18.00, cache_creation: 3.00 } },
|
||||
{ pattern: "*-codex-low", pricing: { input: 1.75, output: 14.00, cached: 0.175, reasoning: 14.00, cache_creation: 1.75 } },
|
||||
{ pattern: "*-codex-none", pricing: { input: 1.75, output: 14.00, cached: 0.175, reasoning: 14.00, cache_creation: 1.75 } },
|
||||
{ pattern: "*-codex-spark", pricing: { input: 3.00, output: 12.00, cached: 0.30, reasoning: 12.00, cache_creation: 3.00 } },
|
||||
{ pattern: "codex-*", pricing: { input: 3.00, output: 12.00, cached: 1.50, reasoning: 18.00, cache_creation: 3.00 } },
|
||||
{ pattern: "*-codex", pricing: { input: 3.00, output: 12.00, cached: 1.50, reasoning: 18.00, cache_creation: 3.00 } },
|
||||
{ pattern: "codex-*", pricing: { input: 1.75, output: 14.00, cached: 0.175, reasoning: 14.00, cache_creation: 1.75 } },
|
||||
{ pattern: "*-codex", pricing: { input: 1.75, output: 14.00, cached: 0.175, reasoning: 14.00, cache_creation: 1.75 } },
|
||||
|
||||
// --- Claude ---
|
||||
{ pattern: "claude-opus-*", pricing: { input: 5.00, output: 25.00, cached: 0.50, reasoning: 25.00, cache_creation: 6.25 } },
|
||||
@@ -161,11 +162,12 @@ export const PATTERN_PRICING = [
|
||||
{ pattern: "gemini-*", pricing: { input: 0.50, output: 3.00, cached: 0.03, reasoning: 4.50, cache_creation: 0.50 } },
|
||||
|
||||
// --- GPT (specific first, generic last) ---
|
||||
{ pattern: "gpt-5.3-*", pricing: { input: 6.00, output: 24.00, cached: 3.00, reasoning: 36.00, cache_creation: 6.00 } },
|
||||
{ pattern: "gpt-5.2-*", pricing: { input: 5.00, output: 20.00, cached: 2.50, reasoning: 30.00, cache_creation: 5.00 } },
|
||||
{ pattern: "gpt-5.1-*", pricing: { input: 4.00, output: 16.00, cached: 2.00, reasoning: 24.00, cache_creation: 4.00 } },
|
||||
{ pattern: "gpt-5-*", pricing: { input: 3.00, output: 12.00, cached: 1.50, reasoning: 18.00, cache_creation: 3.00 } },
|
||||
{ pattern: "gpt-5*", pricing: { input: 3.00, output: 12.00, cached: 1.50, reasoning: 18.00, cache_creation: 3.00 } },
|
||||
{ pattern: "gpt-5.6-*", pricing: { input: 2.50, output: 15.00, cached: 0.25, reasoning: 15.00, cache_creation: 2.50 } },
|
||||
{ pattern: "gpt-5.3-*", pricing: { input: 1.75, output: 14.00, cached: 0.175, reasoning: 14.00, cache_creation: 1.75 } },
|
||||
{ pattern: "gpt-5.2-*", pricing: { input: 1.75, output: 14.00, cached: 0.175, reasoning: 14.00, cache_creation: 1.75 } },
|
||||
{ pattern: "gpt-5.1-*", pricing: { input: 1.25, output: 10.00, cached: 0.625, reasoning: 10.00, cache_creation: 1.25 } },
|
||||
{ pattern: "gpt-5-*", pricing: { input: 1.25, output: 10.00, cached: 0.625, reasoning: 10.00, cache_creation: 1.25 } },
|
||||
{ pattern: "gpt-5*", pricing: { input: 1.25, output: 10.00, cached: 0.625, reasoning: 10.00, cache_creation: 1.25 } },
|
||||
{ pattern: "gpt-4o-*", pricing: { input: 0.15, output: 0.60, cached: 0.075, reasoning: 0.90, cache_creation: 0.15 } },
|
||||
{ pattern: "gpt-4o", pricing: { input: 2.50, output: 10.00, cached: 1.25, reasoning: 15.00, cache_creation: 2.50 } },
|
||||
{ pattern: "gpt-4*", pricing: { input: 2.50, output: 10.00, cached: 1.25, reasoning: 15.00, cache_creation: 2.50 } },
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { platform, arch } from "os";
|
||||
import { ANTIGRAVITY_OAUTH_CLIENT } from "../shared.js";
|
||||
import { ANTIGRAVITY_IDE_BASE_URL, ANTIGRAVITY_IDE_USER_AGENT, ANTIGRAVITY_OAUTH_CLIENT } from "../shared.js";
|
||||
|
||||
export default {
|
||||
id: "antigravity",
|
||||
@@ -20,13 +19,10 @@ export default {
|
||||
category: "oauth",
|
||||
serviceKinds: ["llm", "image"],
|
||||
transport: {
|
||||
baseUrls: [
|
||||
"https://daily-cloudcode-pa.googleapis.com",
|
||||
"https://daily-cloudcode-pa.sandbox.googleapis.com",
|
||||
],
|
||||
baseUrls: [ANTIGRAVITY_IDE_BASE_URL],
|
||||
format: "antigravity",
|
||||
headers: {
|
||||
"User-Agent": "antigravity/1.107.0 darwin/arm64",
|
||||
"User-Agent": ANTIGRAVITY_IDE_USER_AGENT,
|
||||
},
|
||||
retry: {
|
||||
"429": {
|
||||
|
||||
@@ -60,12 +60,10 @@ export default {
|
||||
},
|
||||
},
|
||||
models: [
|
||||
{ id: "claude-fable-5", name: "Claude Fable 5" },
|
||||
{ id: "claude-sonnet-5", name: "Claude Sonnet 5" },
|
||||
{ id: "claude-opus-4-8", name: "Claude Opus 4.8" },
|
||||
{ id: "claude-opus-4-7", name: "Claude Opus 4.7" },
|
||||
{ id: "claude-opus-4-6", name: "Claude Opus 4.6" },
|
||||
{ id: "claude-sonnet-4-6", name: "Claude Sonnet 4.6" },
|
||||
{ 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" },
|
||||
],
|
||||
oauth: {
|
||||
|
||||
@@ -45,22 +45,18 @@ export default {
|
||||
},
|
||||
},
|
||||
models: [
|
||||
{ id: "gpt-5.6-sol", name: "GPT 5.6 Sol" },
|
||||
{ id: "gpt-5.6-sol-review", name: "GPT 5.6 Sol Review", upstreamModelId: "gpt-5.6-sol", quotaFamily: "review" },
|
||||
{ id: "gpt-5.6-terra", name: "GPT 5.6 Terra" },
|
||||
{ id: "gpt-5.6-terra-review", name: "GPT 5.6 Terra Review", upstreamModelId: "gpt-5.6-terra", quotaFamily: "review" },
|
||||
{ id: "gpt-5.6-luna", name: "GPT 5.6 Luna" },
|
||||
{ id: "gpt-5.6-luna-review", name: "GPT 5.6 Luna Review", upstreamModelId: "gpt-5.6-luna", quotaFamily: "review" },
|
||||
{ id: "gpt-5.5", name: "GPT 5.5" },
|
||||
{ id: "gpt-5.5-review", name: "GPT 5.5 Review", upstreamModelId: "gpt-5.5", quotaFamily: "review" },
|
||||
{ id: "gpt-5.4", name: "GPT 5.4" },
|
||||
{ id: "gpt-5.4-review", name: "GPT 5.4 Review", upstreamModelId: "gpt-5.4", quotaFamily: "review" },
|
||||
{ id: "gpt-5.4-mini", name: "GPT 5.4 Mini" },
|
||||
{ id: "gpt-5.4-mini-review", name: "GPT 5.4 Mini Review", upstreamModelId: "gpt-5.4-mini", quotaFamily: "review" },
|
||||
{ id: "gpt-5.3-codex", name: "GPT 5.3 Codex" },
|
||||
{ id: "gpt-5.3-codex-review", name: "GPT 5.3 Codex Review", upstreamModelId: "gpt-5.3-codex", quotaFamily: "review" },
|
||||
{ id: "gpt-5.3-codex-xhigh", name: "GPT 5.3 Codex (xHigh)" },
|
||||
{ id: "gpt-5.3-codex-xhigh-review", name: "GPT 5.3 Codex (xHigh) Review", upstreamModelId: "gpt-5.3-codex-xhigh", quotaFamily: "review" },
|
||||
{ id: "gpt-5.3-codex-high", name: "GPT 5.3 Codex (High)" },
|
||||
{ id: "gpt-5.3-codex-high-review", name: "GPT 5.3 Codex (High) Review", upstreamModelId: "gpt-5.3-codex-high", quotaFamily: "review" },
|
||||
{ id: "gpt-5.3-codex-low", name: "GPT 5.3 Codex (Low)" },
|
||||
{ id: "gpt-5.3-codex-low-review", name: "GPT 5.3 Codex (Low) Review", upstreamModelId: "gpt-5.3-codex-low", quotaFamily: "review" },
|
||||
{ id: "gpt-5.3-codex-none", name: "GPT 5.3 Codex (None)" },
|
||||
{ id: "gpt-5.3-codex-none-review", name: "GPT 5.3 Codex (None) Review", upstreamModelId: "gpt-5.3-codex-none", quotaFamily: "review" },
|
||||
{ id: "gpt-5.3-codex-spark", name: "GPT 5.3 Codex Spark" },
|
||||
{ id: "gpt-5.3-codex-spark-review", name: "GPT 5.3 Codex Spark Review", upstreamModelId: "gpt-5.3-codex-spark", quotaFamily: "review" },
|
||||
{ id: "gpt-5.5-image", name: "GPT 5.5 Image", capabilities: ["text2img","edit"], params: ["size","quality","background","image_detail","output_format"], kind: "image" },
|
||||
|
||||
34
open-sse/providers/registry/featherless.js
Normal file
34
open-sse/providers/registry/featherless.js
Normal file
@@ -0,0 +1,34 @@
|
||||
export default {
|
||||
id: "featherless",
|
||||
priority: 65,
|
||||
alias: "featherless",
|
||||
aliases: [
|
||||
"fl",
|
||||
],
|
||||
uiAlias: "fl",
|
||||
display: {
|
||||
name: "Featherless",
|
||||
icon: "flutter_dash",
|
||||
color: "#111827",
|
||||
textIcon: "FL",
|
||||
website: "https://featherless.ai",
|
||||
notice: {
|
||||
apiKeyUrl: "https://featherless.ai/account/api-keys",
|
||||
},
|
||||
},
|
||||
category: "apikey",
|
||||
authType: "apikey",
|
||||
transport: {
|
||||
baseUrl: "https://api.featherless.ai/v1/chat/completions",
|
||||
validateUrl: "https://api.featherless.ai/v1/models",
|
||||
},
|
||||
models: [
|
||||
{ id: "deepseek-ai/DeepSeek-V4-Pro", name: "DeepSeek V4 Pro" },
|
||||
{ id: "deepseek-ai/DeepSeek-V4-Flash", name: "DeepSeek V4 Flash" },
|
||||
{ id: "zai-org/GLM-5.2", name: "GLM 5.2" },
|
||||
{ id: "zai-org/GLM-5.1", name: "GLM 5.1" },
|
||||
{ id: "moonshotai/Kimi-K2.7-Code", name: "Kimi K2.7 Code" },
|
||||
{ id: "moonshotai/Kimi-K2.6", name: "Kimi K2.6" },
|
||||
{ id: "moonshotai/Kimi-K2.5", name: "Kimi K2.5" },
|
||||
],
|
||||
};
|
||||
86
open-sse/providers/registry/grok-cli.js
Normal file
86
open-sse/providers/registry/grok-cli.js
Normal file
@@ -0,0 +1,86 @@
|
||||
/**
|
||||
* Grok CLI / Grok Build (cli-chat-proxy.grok.com)
|
||||
*
|
||||
* Source of truth: HAR capture of official grok-shell/grok-pager 0.2.93
|
||||
* talking to https://cli-chat-proxy.grok.com (OpenAI Responses API).
|
||||
*
|
||||
* Distinct from:
|
||||
* - `xai` → api.x.ai (API key / Grok Build OAuth PKCE)
|
||||
* - `grok-web` → grok.com web SSO cookie
|
||||
*/
|
||||
export default {
|
||||
id: "grok-cli",
|
||||
priority: 275,
|
||||
alias: "gcli",
|
||||
aliases: ["grok-build", "gb"],
|
||||
uiAlias: "gcli",
|
||||
display: {
|
||||
name: "Grok CLI (Grok Build)",
|
||||
icon: "auto_awesome",
|
||||
color: "#1DA1F2",
|
||||
textIcon: "GC",
|
||||
website: "https://x.ai",
|
||||
notice: {
|
||||
text: "Sign in with your xAI / Grok account via device code. Uses Grok Build subscription credits (cli-chat-proxy.grok.com).",
|
||||
signupUrl: "https://grok.com/supergrok",
|
||||
},
|
||||
},
|
||||
category: "oauth",
|
||||
authModes: ["oauth"],
|
||||
hasOAuth: true,
|
||||
thinkingConfig: {
|
||||
options: ["low", "medium", "high"],
|
||||
defaultMode: "high",
|
||||
},
|
||||
transport: {
|
||||
baseUrl: "https://cli-chat-proxy.grok.com/v1/responses",
|
||||
format: "openai-responses",
|
||||
forceStream: true,
|
||||
modelsUrl: "https://cli-chat-proxy.grok.com/v1/models",
|
||||
userUrl: "https://cli-chat-proxy.grok.com/v1/user",
|
||||
billingUrl: "https://cli-chat-proxy.grok.com/v1/billing",
|
||||
clientVersion: "0.2.93",
|
||||
clientIdentifier: "grok-pager",
|
||||
tokenAuth: "xai-grok-cli",
|
||||
headers: {
|
||||
"User-Agent": "grok-pager/0.2.93 grok-shell/0.2.93 (linux; x86_64)",
|
||||
"x-xai-token-auth": "xai-grok-cli",
|
||||
"x-grok-client-identifier": "grok-pager",
|
||||
"x-grok-client-version": "0.2.93",
|
||||
"x-authenticateresponse": "authenticate-response",
|
||||
},
|
||||
// Compaction threshold mirrored from CLI (x-compaction-at)
|
||||
compactionAt: 400000,
|
||||
// Quota tracker: official CLI polls billing?format=credits + user?include=subscription
|
||||
usage: {
|
||||
url: "https://cli-chat-proxy.grok.com/v1/billing?format=credits",
|
||||
userUrl: "https://cli-chat-proxy.grok.com/v1/user?include=subscription",
|
||||
},
|
||||
retry: {
|
||||
429: { attempts: 2, delayMs: 2000 },
|
||||
502: { attempts: 2, delayMs: 1500 },
|
||||
503: { attempts: 2, delayMs: 1500 },
|
||||
},
|
||||
},
|
||||
models: [
|
||||
{ id: "grok-4.5", name: "Grok 4.5" },
|
||||
{ id: "grok-4.5-high", name: "Grok 4.5 (High)", upstreamModelId: "grok-4.5" },
|
||||
{ id: "grok-4.5-medium", name: "Grok 4.5 (Medium)", upstreamModelId: "grok-4.5" },
|
||||
{ id: "grok-4.5-low", name: "Grok 4.5 (Low)", upstreamModelId: "grok-4.5" },
|
||||
],
|
||||
features: {
|
||||
usage: true,
|
||||
},
|
||||
oauth: {
|
||||
// Same public client_id as Grok CLI / existing xai OAuth
|
||||
clientId: "b1a00492-073a-47ea-816f-4c329264a828",
|
||||
deviceCodeUrl: "https://auth.x.ai/oauth2/device/code",
|
||||
tokenUrl: "https://auth.x.ai/oauth2/token",
|
||||
refreshUrl: "https://auth.x.ai/oauth2/token",
|
||||
// HAR scope includes conversations read/write beyond the api-only xai scope
|
||||
scope:
|
||||
"openid profile email offline_access grok-cli:access api:access conversations:read conversations:write",
|
||||
referrer: "grok-build",
|
||||
refreshLeadMs: 5 * 60 * 1000,
|
||||
},
|
||||
};
|
||||
@@ -1,4 +1,4 @@
|
||||
// Auto-generated: static imports of all registry entries
|
||||
// Auto-generated: static imports for all registry entries
|
||||
import p0 from "./alicode-intl.js";
|
||||
import p1 from "./alicode.js";
|
||||
import p2 from "./anthropic.js";
|
||||
@@ -30,72 +30,75 @@ import p27 from "./edge-tts.js";
|
||||
import p28 from "./elevenlabs.js";
|
||||
import p29 from "./exa.js";
|
||||
import p30 from "./fal-ai.js";
|
||||
import p31 from "./firecrawl.js";
|
||||
import p32 from "./fireworks.js";
|
||||
import p33 from "./gemini-cli.js";
|
||||
import p34 from "./gemini.js";
|
||||
import p35 from "./github.js";
|
||||
import p36 from "./gitlab.js";
|
||||
import p37 from "./glm-cn.js";
|
||||
import p38 from "./glm.js";
|
||||
import p39 from "./google-pse.js";
|
||||
import p40 from "./google-tts.js";
|
||||
import p41 from "./grok-web.js";
|
||||
import p42 from "./groq.js";
|
||||
import p43 from "./huggingface.js";
|
||||
import p44 from "./hyperbolic.js";
|
||||
import p45 from "./iflow.js";
|
||||
import p46 from "./inworld.js";
|
||||
import p47 from "./jina-ai.js";
|
||||
import p48 from "./jina-reader.js";
|
||||
import p49 from "./kilocode.js";
|
||||
import p50 from "./kimchi.js";
|
||||
import p51 from "./kimi-coding.js";
|
||||
import p52 from "./kimi.js";
|
||||
import p53 from "./kiro.js";
|
||||
import p54 from "./linkup.js";
|
||||
import p55 from "./local-device.js";
|
||||
import p56 from "./mimo-free.js";
|
||||
import p57 from "./minimax-cn.js";
|
||||
import p58 from "./minimax.js";
|
||||
import p59 from "./mistral.js";
|
||||
import p60 from "./mmf.js";
|
||||
import p61 from "./nanobanana.js";
|
||||
import p62 from "./nebius.js";
|
||||
import p63 from "./nvidia.js";
|
||||
import p64 from "./ollama-local.js";
|
||||
import p65 from "./ollama.js";
|
||||
import p66 from "./openai.js";
|
||||
import p67 from "./opencode-go.js";
|
||||
import p68 from "./opencode.js";
|
||||
import p69 from "./openrouter.js";
|
||||
import p70 from "./perplexity-web.js";
|
||||
import p71 from "./perplexity.js";
|
||||
import p72 from "./playht.js";
|
||||
import p73 from "./qoder.js";
|
||||
import p74 from "./qwen.js";
|
||||
import p75 from "./recraft.js";
|
||||
import p76 from "./runwayml.js";
|
||||
import p77 from "./sdwebui.js";
|
||||
import p78 from "./searchapi.js";
|
||||
import p79 from "./searxng.js";
|
||||
import p80 from "./serper.js";
|
||||
import p81 from "./siliconflow.js";
|
||||
import p82 from "./stability-ai.js";
|
||||
import p83 from "./tavily.js";
|
||||
import p84 from "./together.js";
|
||||
import p85 from "./topaz.js";
|
||||
import p86 from "./tortoise.js";
|
||||
import p87 from "./venice.js";
|
||||
import p88 from "./vercel-ai-gateway.js";
|
||||
import p89 from "./vertex-partner.js";
|
||||
import p90 from "./vertex.js";
|
||||
import p91 from "./volcengine-ark.js";
|
||||
import p92 from "./voyage-ai.js";
|
||||
import p93 from "./xai.js";
|
||||
import p94 from "./xiaomi-mimo.js";
|
||||
import p95 from "./xiaomi-tokenplan.js";
|
||||
import p96 from "./youcom.js";
|
||||
import p31 from "./featherless.js";
|
||||
import p32 from "./firecrawl.js";
|
||||
import p33 from "./fireworks.js";
|
||||
import p34 from "./gemini-cli.js";
|
||||
import p35 from "./gemini.js";
|
||||
import p36 from "./github.js";
|
||||
import p37 from "./gitlab.js";
|
||||
import p38 from "./glm-cn.js";
|
||||
import p39 from "./glm.js";
|
||||
import p40 from "./google-pse.js";
|
||||
import p41 from "./google-tts.js";
|
||||
import p42 from "./grok-cli.js";
|
||||
import p43 from "./grok-web.js";
|
||||
import p44 from "./groq.js";
|
||||
import p45 from "./huggingface.js";
|
||||
import p46 from "./hyperbolic.js";
|
||||
import p47 from "./iflow.js";
|
||||
import p48 from "./inworld.js";
|
||||
import p49 from "./jina-ai.js";
|
||||
import p50 from "./jina-reader.js";
|
||||
import p51 from "./kilocode.js";
|
||||
import p52 from "./kimchi.js";
|
||||
import p53 from "./kimi-coding.js";
|
||||
import p54 from "./kimi.js";
|
||||
import p55 from "./kiro.js";
|
||||
import p56 from "./linkup.js";
|
||||
import p57 from "./local-device.js";
|
||||
import p58 from "./mimo-free.js";
|
||||
import p59 from "./minimax-cn.js";
|
||||
import p60 from "./minimax.js";
|
||||
import p61 from "./mistral.js";
|
||||
import p62 from "./mmf.js";
|
||||
import p63 from "./nanobanana.js";
|
||||
import p64 from "./nebius.js";
|
||||
import p65 from "./nvidia.js";
|
||||
import p66 from "./ollama-local.js";
|
||||
import p67 from "./ollama.js";
|
||||
import p68 from "./openai.js";
|
||||
import p69 from "./opencode-go.js";
|
||||
import p70 from "./opencode.js";
|
||||
import p71 from "./openrouter.js";
|
||||
import p72 from "./perplexity-web.js";
|
||||
import p73 from "./perplexity.js";
|
||||
import p74 from "./perplexity-agent.js";
|
||||
import p75 from "./playht.js";
|
||||
import p76 from "./qoder.js";
|
||||
import p77 from "./qwen.js";
|
||||
import p78 from "./recraft.js";
|
||||
import p79 from "./runwayml.js";
|
||||
import p80 from "./sdwebui.js";
|
||||
import p81 from "./searchapi.js";
|
||||
import p82 from "./searxng.js";
|
||||
import p83 from "./serper.js";
|
||||
import p84 from "./siliconflow.js";
|
||||
import p85 from "./stability-ai.js";
|
||||
import p86 from "./tavily.js";
|
||||
import p87 from "./together.js";
|
||||
import p88 from "./topaz.js";
|
||||
import p89 from "./tortoise.js";
|
||||
import p90 from "./venice.js";
|
||||
import p91 from "./vercel-ai-gateway.js";
|
||||
import p92 from "./vertex-partner.js";
|
||||
import p93 from "./vertex.js";
|
||||
import p94 from "./volcengine-ark.js";
|
||||
import p95 from "./voyage-ai.js";
|
||||
import p96 from "./xai.js";
|
||||
import p97 from "./xiaomi-mimo.js";
|
||||
import p98 from "./xiaomi-tokenplan.js";
|
||||
import p99 from "./youcom.js";
|
||||
|
||||
export default [
|
||||
p0,
|
||||
@@ -194,5 +197,8 @@ export default [
|
||||
p93,
|
||||
p94,
|
||||
p95,
|
||||
p96
|
||||
p96,
|
||||
p97,
|
||||
p98,
|
||||
p99
|
||||
];
|
||||
|
||||
@@ -42,19 +42,38 @@ export default {
|
||||
},
|
||||
},
|
||||
models: [
|
||||
// Opus (added per kiro.dev/changelog/models and kiro.dev/docs/models)
|
||||
{ id: "claude-opus-4.8", name: "Claude Opus 4.8" },
|
||||
{ id: "claude-opus-4.8-thinking", name: "Claude Opus 4.8 (Thinking)" },
|
||||
{ id: "claude-opus-4.8-agentic", name: "Claude Opus 4.8 (Agentic)" },
|
||||
{ id: "claude-opus-4.8-thinking-agentic", name: "Claude Opus 4.8 (Thinking + Agentic)" },
|
||||
{ id: "claude-opus-4.7", name: "Claude Opus 4.7" },
|
||||
{ id: "claude-opus-4.7-thinking", name: "Claude Opus 4.7 (Thinking)" },
|
||||
{ id: "claude-opus-4.7-agentic", name: "Claude Opus 4.7 (Agentic)" },
|
||||
{ id: "claude-opus-4.7-thinking-agentic", name: "Claude Opus 4.7 (Thinking + Agentic)" },
|
||||
{ id: "claude-opus-4.5", name: "Claude Opus 4.5" },
|
||||
{ id: "claude-opus-4.5-thinking", name: "Claude Opus 4.5 (Thinking)" },
|
||||
{ id: "claude-opus-4.5-agentic", name: "Claude Opus 4.5 (Agentic)" },
|
||||
{ id: "claude-opus-4.5-thinking-agentic", name: "Claude Opus 4.5 (Thinking + Agentic)" },
|
||||
// Sonnet
|
||||
{ id: "claude-sonnet-5", name: "Claude Sonnet 5" },
|
||||
{ id: "claude-sonnet-4.5", name: "Claude Sonnet 4.5" },
|
||||
// Haiku
|
||||
{ id: "claude-haiku-4.5", name: "Claude Haiku 4.5" },
|
||||
// Non-Anthropic
|
||||
{ id: "deepseek-3.2", name: "DeepSeek 3.2", strip: ["image","audio"] },
|
||||
{ id: "qwen3-coder-next", name: "Qwen3 Coder Next", strip: ["image","audio"] },
|
||||
{ id: "glm-5", name: "GLM 5" },
|
||||
{ id: "MiniMax-M2.5", name: "MiniMax M2.5" },
|
||||
// Thinking variants
|
||||
{ id: "claude-sonnet-5-thinking", name: "Claude Sonnet 5 (Thinking)" },
|
||||
{ id: "claude-sonnet-4.5-thinking", name: "Claude Sonnet 4.5 (Thinking)" },
|
||||
{ id: "claude-haiku-4.5-thinking", name: "Claude Haiku 4.5 (Thinking)" },
|
||||
// Agentic variants
|
||||
{ id: "claude-sonnet-5-agentic", name: "Claude Sonnet 5 (Agentic)" },
|
||||
{ id: "claude-sonnet-4.5-agentic", name: "Claude Sonnet 4.5 (Agentic)" },
|
||||
{ id: "claude-haiku-4.5-agentic", name: "Claude Haiku 4.5 (Agentic)" },
|
||||
// Thinking + Agentic variants
|
||||
{ id: "claude-sonnet-5-thinking-agentic", name: "Claude Sonnet 5 (Thinking + Agentic)" },
|
||||
{ id: "claude-sonnet-4.5-thinking-agentic", name: "Claude Sonnet 4.5 (Thinking + Agentic)" },
|
||||
{ id: "claude-haiku-4.5-thinking-agentic", name: "Claude Haiku 4.5 (Thinking + Agentic)" },
|
||||
|
||||
49
open-sse/providers/registry/perplexity-agent.js
Normal file
49
open-sse/providers/registry/perplexity-agent.js
Normal file
@@ -0,0 +1,49 @@
|
||||
export default {
|
||||
id: "perplexity-agent",
|
||||
priority: 181,
|
||||
alias: "perplexity-agent",
|
||||
aliases: [
|
||||
"pplx-agent",
|
||||
"pplx-responses",
|
||||
],
|
||||
uiAlias: "pa",
|
||||
display: {
|
||||
name: "Perplexity Agent",
|
||||
icon: "travel_explore",
|
||||
color: "#20808D",
|
||||
textIcon: "PA",
|
||||
website: "https://www.perplexity.ai",
|
||||
notice: {
|
||||
text: "Perplexity Agent API exposes GPT, Claude, Gemini, Grok, GLM, Kimi, and Sonar models through one OpenAI-compatible Responses API.",
|
||||
apiKeyUrl: "https://www.perplexity.ai/settings/api",
|
||||
},
|
||||
},
|
||||
category: "apikey",
|
||||
authType: "apikey",
|
||||
transport: {
|
||||
baseUrl: "https://api.perplexity.ai/v1/responses",
|
||||
validateUrl: "https://api.perplexity.ai/v1/models",
|
||||
format: "openai-responses",
|
||||
},
|
||||
models: [
|
||||
{ id: "perplexity/sonar", name: "Perplexity Sonar" },
|
||||
{ id: "openai/gpt-5.5", name: "GPT-5.5" },
|
||||
{ id: "openai/gpt-5.4", name: "GPT-5.4" },
|
||||
{ id: "openai/gpt-5.4-mini", name: "GPT-5.4 Mini" },
|
||||
{ id: "anthropic/claude-sonnet-4-6", name: "Claude Sonnet 4.6" },
|
||||
{ id: "anthropic/claude-opus-4-8", name: "Claude Opus 4.8" },
|
||||
{ id: "google/gemini-3.1-pro-preview", name: "Gemini 3.1 Pro" },
|
||||
{ id: "xai/grok-4.20-reasoning", name: "Grok 4.20 Reasoning" },
|
||||
{ id: "perplexity/glm-5.2", name: "GLM 5.2" },
|
||||
{ id: "perplexity/kimi-k2.7-code", name: "Kimi K2.7 Code" },
|
||||
{ id: "nvidia/nemotron-3-super-120b-a12b", name: "Nemotron 3 Super 120B" },
|
||||
],
|
||||
serviceKinds: ["llm", "webSearch"],
|
||||
searchViaChat: {
|
||||
defaultModel: "perplexity/sonar",
|
||||
endpoint: "https://api.perplexity.ai/v1/responses",
|
||||
pricingUrl: "https://docs.perplexity.ai/docs/agent-api/models",
|
||||
},
|
||||
modelsFetcher: { url: "https://api.perplexity.ai/v1/models", type: "openai" },
|
||||
passthroughModels: true,
|
||||
};
|
||||
@@ -1,3 +1,5 @@
|
||||
import { SEARXNG_URL } from "../../config/runtimeConfig.js";
|
||||
|
||||
export default {
|
||||
id: "searxng",
|
||||
alias: "searxng",
|
||||
@@ -15,7 +17,7 @@ export default {
|
||||
],
|
||||
noAuth: true,
|
||||
searchConfig: {
|
||||
baseUrl: "http://localhost:8888/search",
|
||||
baseUrl: SEARXNG_URL,
|
||||
method: "GET",
|
||||
authType: "none",
|
||||
authHeader: "none",
|
||||
|
||||
@@ -54,6 +54,13 @@ export const KIMI_CODING_BASE_URL = "https://api.kimi.com/coding/v1/messages";
|
||||
export const OPENAI_COMPAT_BASE = "https://api.openai.com/v1";
|
||||
export const ANTHROPIC_COMPAT_BASE = "https://api.anthropic.com/v1";
|
||||
|
||||
// Official Antigravity IDE Desktop 2.1.1 fingerprint captured from macOS arm64.
|
||||
// Keep this static even when 9router runs on Linux: the provider profile is
|
||||
// intentionally matching the IDE client, not the server host.
|
||||
export const ANTIGRAVITY_IDE_VERSION = "2.1.1";
|
||||
export const ANTIGRAVITY_IDE_BASE_URL = "https://cloudcode-pa.googleapis.com";
|
||||
export const ANTIGRAVITY_IDE_USER_AGENT = `antigravity/ide/${ANTIGRAVITY_IDE_VERSION} darwin/arm64`;
|
||||
|
||||
// Antigravity OAuth client credentials (public CLI client — duplicated in usage.js + src/lib/oauth)
|
||||
export const ANTIGRAVITY_OAUTH_CLIENT = {
|
||||
clientId: "1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",
|
||||
|
||||
48
open-sse/providers/thinkingLevels.js
Normal file
48
open-sse/providers/thinkingLevels.js
Normal file
@@ -0,0 +1,48 @@
|
||||
// Resolve valid thinking levels per model — drives UI level picker (suffix "model(level)").
|
||||
// Reuses capabilities.js (thinkingFormat/canDisable) so this file only maps format→levels (DRY).
|
||||
import { getCapabilitiesForModel } from "./capabilities.js";
|
||||
import { matchPattern } from "./pricing.js";
|
||||
|
||||
// Shared level sets (deduped) — verified against provider docs + wire in thinkingUnified.applyFormat.
|
||||
const L = {
|
||||
base: ["none", "low", "medium", "high"], // qwen, step, hunyuan, gemini-budget
|
||||
onOff: ["none", "thinking"], // zai (binary), minimax (adaptive)
|
||||
openai: ["none", "minimal", "low", "medium", "high", "xhigh"], // GPT-5.x / o-series (no "max")
|
||||
levelMax: ["none", "low", "medium", "high", "max"], // claude-adaptive, kimi
|
||||
budgetX: ["none", "low", "medium", "high", "xhigh", "max"], // claude-budget
|
||||
gemini: ["minimal", "low", "medium", "high"], // gemini-3 thinkingLevel (no disable)
|
||||
hiMax: ["none", "high", "max"], // deepseek (low/med→high, xhigh→max)
|
||||
};
|
||||
|
||||
// thinkingFormat → valid selectable levels (source of truth for UI options).
|
||||
const FORMAT_LEVELS = {
|
||||
openai: L.openai,
|
||||
"claude-adaptive": L.levelMax,
|
||||
"claude-budget": L.budgetX,
|
||||
"gemini-level": L.gemini,
|
||||
"gemini-budget": L.base,
|
||||
zai: L.onOff,
|
||||
qwen: L.base,
|
||||
kimi: L.levelMax,
|
||||
deepseek: L.hiMax,
|
||||
minimax: L.onOff,
|
||||
hunyuan: L.base,
|
||||
step: L.base,
|
||||
};
|
||||
|
||||
// Model-name pattern overrides (glob, first match wins) — more precise than format default.
|
||||
const PATTERN_THINKING = [
|
||||
// gpt-5.6-sol accepts max (maps to xhigh on wire); live probe rejected ultra.
|
||||
{ pattern: "*gpt-5.6-sol*", levels: ["none", "minimal", "low", "medium", "high", "xhigh", "max"] },
|
||||
{ pattern: "*codex*", levels: ["low", "medium", "high", "xhigh"] }, // codex cannot disable thinking
|
||||
];
|
||||
|
||||
// Returns valid thinking levels for a model, or null when the model has no reasoning.
|
||||
export function getThinkingLevels(provider, model) {
|
||||
const caps = getCapabilitiesForModel(provider, model);
|
||||
if (!caps.reasoning) return null;
|
||||
const hit = PATTERN_THINKING.find((p) => matchPattern(p.pattern, model));
|
||||
let levels = hit?.levels || FORMAT_LEVELS[caps.thinkingFormat] || L.base;
|
||||
if (caps.thinkingCanDisable === false) levels = levels.filter((l) => l !== "none");
|
||||
return levels;
|
||||
}
|
||||
Reference in New Issue
Block a user