Merge remote-tracking branch 'origin/master' into gitea/feature/end
Resolved conflicts taking origin/master (v0.5.55) as canonical, with local features re-applied: - runtime log level (LOG_LEVEL env + dashboard Settings → Logging, applied immediately and persisted across restarts) - free/noAuth provider enable/disable toggle via providerStrategies.enabled - parallel model testing (Test All Models / Test Selected Keys)
This commit is contained in:
@@ -71,7 +71,11 @@ export function capabilitiesFromServiceKind(kind) {
|
||||
* otherwise mis-match. Only declare deltas vs DEFAULT.
|
||||
*/
|
||||
export const MODEL_CAPABILITIES = {
|
||||
// Claude 4.6/4.7/4.8 and Kiro Sonnet 5 have 1M context + adaptive thinking (override generic claude pattern)
|
||||
// Claude Opus 5, 4.6/4.7/4.8, and Kiro Sonnet 5 have 1M context + adaptive thinking (override generic claude pattern)
|
||||
"claude-opus-5": { vision: true, reasoning: true, search: true, thinkingFormat: "claude-adaptive", contextWindow: 1000000, maxOutput: 128000 },
|
||||
"claude-opus-5-thinking": { vision: true, reasoning: true, search: true, thinkingFormat: "claude-adaptive", contextWindow: 1000000, maxOutput: 128000 },
|
||||
"claude-opus-5-agentic": { vision: true, reasoning: true, search: true, thinkingFormat: "claude-adaptive", contextWindow: 1000000, maxOutput: 128000 },
|
||||
"claude-opus-5-thinking-agentic": { vision: true, reasoning: true, search: true, thinkingFormat: "claude-adaptive", contextWindow: 1000000, maxOutput: 128000 },
|
||||
"claude-opus-4.6": { vision: true, reasoning: true, search: true, thinkingFormat: "claude-adaptive", contextWindow: 1000000, maxOutput: 128000 },
|
||||
"claude-opus-4.7": { vision: true, reasoning: true, search: true, thinkingFormat: "claude-adaptive", contextWindow: 1000000, maxOutput: 128000 },
|
||||
"claude-opus-4-7": { vision: true, reasoning: true, search: true, thinkingFormat: "claude-adaptive", contextWindow: 1000000, maxOutput: 128000 },
|
||||
@@ -96,8 +100,23 @@ export const MODEL_CAPABILITIES = {
|
||||
// Qwen plain coder/text (no vision) — registry "vision-model" / "coder-model" aliases
|
||||
"vision-model": { vision: true, reasoning: true, thinkingFormat: "qwen", contextWindow: 1000000 },
|
||||
"coder-model": { reasoning: true, thinkingFormat: "qwen", contextWindow: 1000000 },
|
||||
|
||||
// Kimi flagship + coding (platform + Kimi Code ids) — vision/video native
|
||||
"kimi-k3": { vision: true, videoInput: true, reasoning: true, thinkingFormat: "kimi", thinkingCanDisable: false, contextWindow: 1048576, maxOutput: 131072 },
|
||||
"k3": { vision: true, videoInput: true, reasoning: true, thinkingFormat: "kimi", thinkingCanDisable: false, contextWindow: 1048576, maxOutput: 131072 },
|
||||
"kimi-for-coding": { vision: true, videoInput: true, reasoning: true, thinkingFormat: "kimi", thinkingCanDisable: false, contextWindow: 262144, maxOutput: 65536 },
|
||||
"kimi-for-coding-highspeed": { vision: true, videoInput: true, reasoning: true, thinkingFormat: "kimi", thinkingCanDisable: false, contextWindow: 262144, maxOutput: 65536 },
|
||||
"kimi-k2.7-code": { vision: true, videoInput: true, reasoning: true, thinkingFormat: "kimi", thinkingCanDisable: false, contextWindow: 262144, maxOutput: 65536 },
|
||||
"kimi-k2.7-code-highspeed": { vision: true, videoInput: true, reasoning: true, thinkingFormat: "kimi", thinkingCanDisable: false, contextWindow: 262144, maxOutput: 65536 },
|
||||
};
|
||||
|
||||
const KIRO_GPT_5_6_CAPABILITIES = { vision: true, reasoning: true, search: true, thinkingFormat: "openai", contextWindow: 272000, maxOutput: 128000 };
|
||||
|
||||
// Codex OAuth (ChatGPT backend) — per-model context window reported by upstream
|
||||
// (lower than OpenAI API's 1.05M). Sol differs from Terra/Luna. #2720
|
||||
const CODEX_GPT_56_SOL_CAPS = { vision: true, reasoning: true, search: true, thinkingFormat: "openai", contextWindow: 372000, maxOutput: 128000 };
|
||||
const CODEX_GPT_56_DEFAULT_CAPS = { vision: true, reasoning: true, search: true, thinkingFormat: "openai", contextWindow: 272000, maxOutput: 128000 };
|
||||
|
||||
/**
|
||||
* Provider-specific capability overrides. Keyed by provider alias/id.
|
||||
*/
|
||||
@@ -111,6 +130,28 @@ export const PROVIDER_CAPABILITIES = {
|
||||
"deepseek-ai/deepseek-v4-pro": { reasoning: true, thinkingFormat: "openai", contextWindow: 1000000, maxOutput: 65536 },
|
||||
"deepseek-ai/deepseek-v4-flash": { reasoning: true, thinkingFormat: "openai", contextWindow: 1000000, maxOutput: 65536 },
|
||||
},
|
||||
"codex": {
|
||||
"gpt-5.6-sol": CODEX_GPT_56_SOL_CAPS,
|
||||
"gpt-5.6-sol-review": CODEX_GPT_56_SOL_CAPS,
|
||||
"gpt-5.6-terra": CODEX_GPT_56_DEFAULT_CAPS,
|
||||
"gpt-5.6-terra-review": CODEX_GPT_56_DEFAULT_CAPS,
|
||||
"gpt-5.6-luna": CODEX_GPT_56_DEFAULT_CAPS,
|
||||
"gpt-5.6-luna-review": CODEX_GPT_56_DEFAULT_CAPS,
|
||||
},
|
||||
"kiro": {
|
||||
"gpt-5.6-sol": KIRO_GPT_5_6_CAPABILITIES,
|
||||
"gpt-5.6-terra": KIRO_GPT_5_6_CAPABILITIES,
|
||||
"gpt-5.6-luna": KIRO_GPT_5_6_CAPABILITIES,
|
||||
"gpt-5.6-sol-thinking": KIRO_GPT_5_6_CAPABILITIES,
|
||||
"gpt-5.6-terra-thinking": KIRO_GPT_5_6_CAPABILITIES,
|
||||
"gpt-5.6-luna-thinking": KIRO_GPT_5_6_CAPABILITIES,
|
||||
"gpt-5.6-sol-agentic": KIRO_GPT_5_6_CAPABILITIES,
|
||||
"gpt-5.6-terra-agentic": KIRO_GPT_5_6_CAPABILITIES,
|
||||
"gpt-5.6-luna-agentic": KIRO_GPT_5_6_CAPABILITIES,
|
||||
"gpt-5.6-sol-thinking-agentic": KIRO_GPT_5_6_CAPABILITIES,
|
||||
"gpt-5.6-terra-thinking-agentic": KIRO_GPT_5_6_CAPABILITIES,
|
||||
"gpt-5.6-luna-thinking-agentic": KIRO_GPT_5_6_CAPABILITIES,
|
||||
},
|
||||
// CodeBuddy.cn — authoritative per-model metadata from the gateway's model
|
||||
// config (contextWindow=maxInputTokens, maxOutput=maxOutputTokens, vision=
|
||||
// supportsImages). Every model reasons via OpenAI-style reasoning_effort
|
||||
@@ -133,6 +174,11 @@ export const PROVIDER_CAPABILITIES = {
|
||||
"deepseek-v4-flash": { vision: true, reasoning: true, thinkingFormat: "openai", thinkingCanDisable: false, contextWindow: 1000000, maxOutput: 50000 },
|
||||
"deepseek-v3-2-volc": { reasoning: true, thinkingFormat: "openai", thinkingCanDisable: false, contextWindow: 96000, maxOutput: 32000 },
|
||||
},
|
||||
// Poolside Laguna — OpenAI-compatible, all reasoning-capable (32K max output).
|
||||
"poolside": {
|
||||
"laguna-s-2.1": { reasoning: true, thinkingFormat: "openai", contextWindow: 1000000, maxOutput: 32000 },
|
||||
"laguna-xs-2.1": { reasoning: true, thinkingFormat: "openai", contextWindow: 200000, maxOutput: 32000 },
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -143,6 +189,7 @@ export const PROVIDER_CAPABILITIES = {
|
||||
*/
|
||||
export const PATTERN_CAPABILITIES = [
|
||||
// ── Claude (4.6+ = adaptive thinking; older/haiku = budget) ──────
|
||||
{ pattern: "*claude*opus-5*", caps: { vision: true, reasoning: true, search: true, thinkingFormat: "claude-adaptive", contextWindow: 1000000, maxOutput: 128000 } },
|
||||
{ pattern: "*claude*opus-4.6*", caps: { vision: true, reasoning: true, search: true, thinkingFormat: "claude-adaptive" } },
|
||||
{ pattern: "*claude*opus-4.7*", caps: { vision: true, reasoning: true, search: true, thinkingFormat: "claude-adaptive" } },
|
||||
{ pattern: "*claude*opus-4.8*", caps: { vision: true, reasoning: true, search: true, thinkingFormat: "claude-adaptive" } },
|
||||
@@ -158,6 +205,7 @@ export const PATTERN_CAPABILITIES = [
|
||||
|
||||
// ── Gemini (all 2.0+ multimodal + google_search grounding, 1M ctx) ─
|
||||
{ pattern: "*gemini*image*", caps: { vision: true, imageOutput: true, contextWindow: 1048576 } },
|
||||
{ pattern: "*gemini-3.7*", caps: { vision: true, audioInput: true, videoInput: true, reasoning: true, search: true, thinkingFormat: "gemini-level", thinkingCanDisable: false, contextWindow: 1048576, maxOutput: 65536 } },
|
||||
{ pattern: "*gemini-3*pro*", caps: { vision: true, audioInput: true, videoInput: true, reasoning: true, search: true, thinkingFormat: "gemini-level", thinkingCanDisable: false, contextWindow: 1048576, maxOutput: 65535 } },
|
||||
{ pattern: "*gemini-3*", caps: { vision: true, audioInput: true, videoInput: true, reasoning: true, search: true, thinkingFormat: "gemini-level", thinkingCanDisable: false, contextWindow: 1048576, maxOutput: 65536 } },
|
||||
{ pattern: "*gemini-2.5*", caps: { vision: true, audioInput: true, videoInput: true, reasoning: true, search: true, thinkingFormat: "gemini-budget", thinkingRange: { min: 0, max: 24576 }, contextWindow: 1048576, maxOutput: 65536 } },
|
||||
@@ -186,6 +234,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 } },
|
||||
@@ -204,7 +254,9 @@ export const PATTERN_CAPABILITIES = [
|
||||
{ pattern: "*qwen*", caps: { reasoning: true, thinkingFormat: "qwen", contextWindow: 262144 } },
|
||||
|
||||
// ── Kimi (enabled→reasoning_effort; K2.7-code cannot disable) ─────
|
||||
{ pattern: "*kimi*k2.7*code*", caps: { vision: true, reasoning: true, thinkingFormat: "kimi", thinkingCanDisable: false, contextWindow: 262144, maxOutput: 262144 } },
|
||||
{ pattern: "*kimi*k3*", caps: { vision: true, videoInput: true, reasoning: true, thinkingFormat: "kimi", thinkingCanDisable: false, contextWindow: 1048576, maxOutput: 131072 } },
|
||||
{ pattern: "*kimi*for-coding*", caps: { vision: true, videoInput: true, reasoning: true, thinkingFormat: "kimi", thinkingCanDisable: false, contextWindow: 262144, maxOutput: 65536 } },
|
||||
{ pattern: "*kimi*k2.7*code*", caps: { vision: true, videoInput: true, reasoning: true, thinkingFormat: "kimi", thinkingCanDisable: false, contextWindow: 262144, maxOutput: 65536 } },
|
||||
{ pattern: "*kimi*k2*", caps: { vision: true, reasoning: true, thinkingFormat: "kimi", contextWindow: 262144, maxOutput: 262144 } },
|
||||
{ pattern: "*kimi*", caps: { reasoning: true, thinkingFormat: "kimi", contextWindow: 262144 } },
|
||||
|
||||
@@ -228,7 +280,7 @@ export const PATTERN_CAPABILITIES = [
|
||||
{ pattern: "*minimax*", caps: { reasoning: true, thinkingFormat: "minimax", thinkingCanDisable: false, contextWindow: 200000, maxOutput: 131072 } },
|
||||
|
||||
// ── Xiaomi MiMo (vision, 1M / 262K ctx) ──────────────────────────
|
||||
{ pattern: "*mimo*v2.5*", caps: { vision: true, contextWindow: 1048576, maxOutput: 131072 } },
|
||||
{ pattern: "*mimo*v2.5*", caps: { vision: true, audioInput: true, videoInput: true, contextWindow: 1048576, maxOutput: 131072 } },
|
||||
{ pattern: "*mimo*omni*", caps: { vision: true, audioInput: true, contextWindow: 262144, maxOutput: 131072 } },
|
||||
{ pattern: "*mimo*", caps: { vision: true, contextWindow: 262144, maxOutput: 131072 } },
|
||||
|
||||
@@ -250,6 +302,13 @@ export const PATTERN_CAPABILITIES = [
|
||||
{ pattern: "*pplx*", caps: { search: true, contextWindow: 128000 } },
|
||||
{ pattern: "*perplexity*", caps: { search: true, contextWindow: 128000 } },
|
||||
|
||||
// ── Poolside Laguna (resellers: openrouter/nvidia/kilocode/vercel/...) ──
|
||||
// Free tiers cap S 2.1 well below the paid 1M window → match the free suffix
|
||||
// (":free" or "-free", depending on reseller) before the plain id.
|
||||
{ pattern: "*laguna-s-2.1*free*", caps: { reasoning: true, thinkingFormat: "openai", contextWindow: 200000, maxOutput: 32000 } },
|
||||
{ pattern: "*laguna-s-2.1*", caps: { reasoning: true, thinkingFormat: "openai", contextWindow: 1000000, maxOutput: 32000 } },
|
||||
{ pattern: "*laguna*", caps: { reasoning: true, thinkingFormat: "openai", contextWindow: 200000, maxOutput: 32000 } },
|
||||
|
||||
// ── Others ───────────────────────────────────────────────────────
|
||||
{ pattern: "*hunyuan*", caps: { reasoning: true, thinkingFormat: "hunyuan", contextWindow: 262144, maxOutput: 262144 } },
|
||||
{ pattern: "hy3*", caps: { reasoning: true, thinkingFormat: "hunyuan", contextWindow: 262144, maxOutput: 262144 } },
|
||||
@@ -269,13 +328,17 @@ export const PATTERN_CAPABILITIES = [
|
||||
export function getCapabilitiesForModel(provider, model) {
|
||||
if (!model) return { ...DEFAULT_CAPABILITIES };
|
||||
|
||||
// Canonical exact lookup strips vendor prefix: "anthropic/claude-opus-4.7" -> "claude-opus-4.7".
|
||||
const baseModel = model.includes("/") ? model.split("/").pop() : model;
|
||||
|
||||
// 1. Provider-specific override
|
||||
if (provider && PROVIDER_CAPABILITIES[provider]?.[model]) {
|
||||
return { ...DEFAULT_CAPABILITIES, ...PROVIDER_CAPABILITIES[provider][model] };
|
||||
if (provider) {
|
||||
const providerCaps = PROVIDER_CAPABILITIES[provider];
|
||||
if (providerCaps?.[model]) return { ...DEFAULT_CAPABILITIES, ...providerCaps[model] };
|
||||
if (providerCaps?.[baseModel]) return { ...DEFAULT_CAPABILITIES, ...providerCaps[baseModel] };
|
||||
}
|
||||
|
||||
// 2. Canonical exact (strip vendor prefix: "anthropic/claude-opus-4.7" -> "claude-opus-4.7")
|
||||
const baseModel = model.includes("/") ? model.split("/").pop() : model;
|
||||
// 2. Canonical exact
|
||||
if (MODEL_CAPABILITIES[baseModel]) return { ...DEFAULT_CAPABILITIES, ...MODEL_CAPABILITIES[baseModel] };
|
||||
if (MODEL_CAPABILITIES[model]) return { ...DEFAULT_CAPABILITIES, ...MODEL_CAPABILITIES[model] };
|
||||
|
||||
|
||||
@@ -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",
|
||||
@@ -29,3 +38,11 @@ export function modelStrip(model) {
|
||||
export function modelTargetFormat(model) {
|
||||
return model?.targetFormat || MODEL_DEFAULTS.targetFormat;
|
||||
}
|
||||
|
||||
// Per-model declared upstream formats (e.g. ["openai", "claude"]). Guards the
|
||||
// sourceFormat-matched transport for multi-endpoint providers whose models differ
|
||||
// in endpoint support (opencode-go: kimi/glm only do /chat/completions, minimax/qwen
|
||||
// also do /messages, deepseek also does /responses).
|
||||
export function modelSupportedFormats(model) {
|
||||
return model?.supportedFormats || null;
|
||||
}
|
||||
|
||||
@@ -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,27 +37,37 @@ 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 },
|
||||
|
||||
// === Gemini ===
|
||||
"gemini-3-flash-preview": { input: 0.50, output: 3.00, cached: 0.03, reasoning: 4.50, cache_creation: 0.50 },
|
||||
"gemini-3.7-flash": { input: 1.50, output: 7.50, cached: 0.15, reasoning: 11.25, cache_creation: 1.875 },
|
||||
"gemini-3.7-flash-high": { input: 1.50, output: 7.50, cached: 0.15, reasoning: 11.25, cache_creation: 1.875 },
|
||||
"gemini-3.7-flash-medium": { input: 1.50, output: 7.50, cached: 0.15, reasoning: 11.25, cache_creation: 1.875 },
|
||||
"gemini-3.7-flash-low": { input: 1.50, output: 7.50, cached: 0.15, reasoning: 11.25, cache_creation: 1.875 },
|
||||
"gemini-3.6-flash": { input: 1.50, output: 7.50, cached: 0.15, reasoning: 11.25, cache_creation: 1.875 },
|
||||
"gemini-3.6-flash-high": { input: 1.50, output: 7.50, cached: 0.15, reasoning: 11.25, cache_creation: 1.875 },
|
||||
"gemini-3.6-flash-medium": { input: 1.50, output: 7.50, cached: 0.15, reasoning: 11.25, cache_creation: 1.875 },
|
||||
"gemini-3.6-flash-low": { input: 1.50, output: 7.50, cached: 0.15, reasoning: 11.25, cache_creation: 1.875 },
|
||||
"gemini-3.5-flash-lite": { input: 0.30, output: 2.50, cached: 0.03, reasoning: 3.75, cache_creation: 0.375 },
|
||||
"gemini-3.5-flash-high": { input: 0.50, output: 3.00, cached: 0.03, reasoning: 4.50, cache_creation: 0.50 },
|
||||
"gemini-3-flash-preview": { input: 0.50, output: 3.00, cached: 0.03, reasoning: 4.50, cache_creation: 0.50 },
|
||||
"gemini-3-pro-preview": { input: 2.00, output: 12.00, cached: 0.25, reasoning: 18.00, cache_creation: 2.00 },
|
||||
"gemini-3.1-pro-low": { input: 2.00, output: 12.00, cached: 0.25, reasoning: 18.00, cache_creation: 2.00 },
|
||||
"gemini-3.1-pro-high": { input: 4.00, output: 18.00, cached: 0.50, reasoning: 27.00, cache_creation: 4.00 },
|
||||
@@ -74,10 +85,18 @@ export const MODEL_PRICING = {
|
||||
"qwen3-coder-flash": { input: 0.50, output: 2.00, cached: 0.25, reasoning: 3.00, cache_creation: 0.50 },
|
||||
|
||||
// === Kimi ===
|
||||
// Official platform.kimi.ai: cache-hit / cache-miss / output per 1M tokens
|
||||
"kimi-k3": { input: 3.00, output: 15.00, cached: 0.30, reasoning: 15.00, cache_creation: 3.00 },
|
||||
"k3": { input: 3.00, output: 15.00, cached: 0.30, reasoning: 15.00, cache_creation: 3.00 },
|
||||
"kimi-k2.7-code": { input: 0.95, output: 4.00, cached: 0.19, reasoning: 4.00, cache_creation: 0.95 },
|
||||
"kimi-k2.7-code-highspeed": { input: 1.90, output: 8.00, cached: 0.38, reasoning: 8.00, cache_creation: 1.90 },
|
||||
"kimi-for-coding": { input: 0.95, output: 4.00, cached: 0.19, reasoning: 4.00, cache_creation: 0.95 },
|
||||
"kimi-for-coding-highspeed": { input: 1.90, output: 8.00, cached: 0.38, reasoning: 8.00, cache_creation: 1.90 },
|
||||
"kimi-k2": { input: 1.00, output: 4.00, cached: 0.50, reasoning: 6.00, cache_creation: 1.00 },
|
||||
"kimi-k2-thinking": { input: 1.50, output: 6.00, cached: 0.75, reasoning: 9.00, cache_creation: 1.50 },
|
||||
"kimi-k2.5": { input: 1.20, output: 4.80, cached: 0.60, reasoning: 7.20, cache_creation: 1.20 },
|
||||
"kimi-k2.5-thinking": { input: 1.80, output: 7.20, cached: 0.90, reasoning: 10.80, cache_creation: 1.80 },
|
||||
"kimi-k2.6": { input: 1.00, output: 4.00, cached: 0.50, reasoning: 6.00, cache_creation: 1.00 },
|
||||
"kimi-latest": { input: 1.00, output: 4.00, cached: 0.50, reasoning: 6.00, cache_creation: 1.00 },
|
||||
|
||||
// === DeepSeek ===
|
||||
@@ -122,10 +141,126 @@ 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 },
|
||||
},
|
||||
// TokenRouter — exact rates from https://api.tokenrouter.com/api/pricing ($1/1M tokens).
|
||||
// Ratio→USD: input = model_ratio×2, output = model_ratio×completion_ratio×2.
|
||||
// These override the canonical MODEL_PRICING/PATTERN_PRICING, whose rates often
|
||||
// differ from TokenRouter's reseller pricing.
|
||||
tokenrouter: {
|
||||
"MiniMax-M3": { input: 0.3, output: 1.2, cached: 0.06, reasoning: 1.2 },
|
||||
"anthropic/claude-fable-5": { input: 10, output: 50, cached: 1.0, cache_creation: 12.5, reasoning: 50 },
|
||||
"anthropic/claude-haiku-4.5": { input: 1.0, output: 5.0, cached: 0.1, cache_creation: 1.25, reasoning: 5.0 },
|
||||
"anthropic/claude-opus-4.5": { input: 5.0, output: 25.0, cached: 0.5, cache_creation: 6.25, reasoning: 25.0 },
|
||||
"anthropic/claude-opus-4.6": { input: 5.0, output: 25.0, cached: 0.5, cache_creation: 6.25, reasoning: 25.0 },
|
||||
"anthropic/claude-opus-4.7": { input: 5.0, output: 25.0, cached: 0.5, cache_creation: 6.25, reasoning: 25.0 },
|
||||
"anthropic/claude-opus-4.7-fast": { input: 30, output: 150, cached: 3.0, reasoning: 150 },
|
||||
"anthropic/claude-opus-4.8": { input: 5.0, output: 25.0, cached: 0.5, cache_creation: 6.25, reasoning: 25.0 },
|
||||
"anthropic/claude-opus-4.8-fast": { input: 10, output: 50, cached: 1.0, cache_creation: 12.5, reasoning: 50 },
|
||||
"anthropic/claude-opus-5": { input: 5.0, output: 25.0, cached: 0.5, cache_creation: 6.25, reasoning: 25.0 },
|
||||
"anthropic/claude-opus-5-fast": { input: 10, output: 50, cached: 1.0, cache_creation: 12.5, reasoning: 50 },
|
||||
"anthropic/claude-sonnet-4": { input: 3.0, output: 15.0, cached: 0.3, cache_creation: 3.75, reasoning: 15.0 },
|
||||
"anthropic/claude-sonnet-4.5": { input: 3.0, output: 15.0, cached: 0.3, cache_creation: 3.75, reasoning: 15.0 },
|
||||
"anthropic/claude-sonnet-4.6": { input: 3.0, output: 15.0, cached: 0.3, cache_creation: 3.75, reasoning: 15.0 },
|
||||
"anthropic/claude-sonnet-5": { input: 2, output: 10, cached: 0.2, reasoning: 10 },
|
||||
"claude-opus-4-8-m-aws": { input: 5.0, output: 25.0, cached: 0.5, cache_creation: 6.25, reasoning: 25.0 },
|
||||
"deepseek/deepseek-v3.2": { input: 0.26, output: 0.38, cached: 0.13, reasoning: 0.38 },
|
||||
"deepseek/deepseek-v4-flash": { input: 0.14, output: 0.28, cached: 0.0028, reasoning: 0.28 },
|
||||
"deepseek/deepseek-v4-flash-0731": { input: 0.14, output: 0.28, cached: 0.0028, reasoning: 0.28 },
|
||||
"deepseek/deepseek-v4-pro": { input: 0.435, output: 0.87, cached: 0.003625, reasoning: 0.87 },
|
||||
"ex/gpt-5.4": { input: 2.5, output: 15.0, cached: 0.25, reasoning: 15.0 },
|
||||
"google/gemini-2.5-flash-image": { input: 0.3, output: 2.5, reasoning: 2.5 },
|
||||
"google/gemini-3-flash-preview": { input: 0.5, output: 3.0, cached: 0.05, cache_creation: 0.08333, reasoning: 3.0 },
|
||||
"google/gemini-3-pro-image-preview": { input: 2, output: 12, reasoning: 12 },
|
||||
"google/gemini-3.1-flash-image-preview": { input: 0.5, output: 3.0, reasoning: 3.0 },
|
||||
"google/gemini-3.1-flash-lite-image": { input: 0.25, output: 1.5, reasoning: 1.5 },
|
||||
"google/gemini-3.1-pro-preview": { input: 2, output: 12, cached: 0.2, cache_creation: 0.375, reasoning: 12 },
|
||||
"google/gemini-3.5-flash": { input: 1.5, output: 9.0, cached: 0.15, cache_creation: 0.08333, reasoning: 9.0 },
|
||||
"google/gemini-3.5-flash-lite": { input: 0.3, output: 2.5, cached: 0.03, cache_creation: 0.08333, reasoning: 2.5 },
|
||||
"google/gemini-3.6-flash": { input: 1.5, output: 7.5, cached: 0.15, cache_creation: 0.08333, reasoning: 7.5 },
|
||||
"google/gemini-embedding-2": { input: 1.0, output: 6.0, cached: 0.1, reasoning: 6.0 },
|
||||
"google/gemma-4-26b-a4b-it": { input: 0.06, output: 0.33, reasoning: 0.33 },
|
||||
"kling-3.0-turbo": { input: 2.1, output: 2.1, reasoning: 2.1 },
|
||||
"microsoft/mai-image-2.5": { input: 5.0, output: 47.0, reasoning: 47.0 },
|
||||
"minimax/minimax-m2-her": { input: 0.3, output: 1.2, cached: 0.03, reasoning: 1.2 },
|
||||
"minimax/minimax-m2.1": { input: 0.3, output: 1.2, cached: 0.03, reasoning: 1.2 },
|
||||
"minimax/minimax-m2.1-highspeed": { input: 0.6, output: 2.4, cached: 0.06, reasoning: 2.4 },
|
||||
"minimax/minimax-m2.5": { input: 0.3, output: 1.2, cached: 0.03, reasoning: 1.2 },
|
||||
"minimax/minimax-m2.7": { input: 0.3, output: 1.2, cached: 0.06, reasoning: 1.2 },
|
||||
"minimax/minimax-m2.7-highspeed": { input: 0.6, output: 2.4, cached: 0.06, reasoning: 2.4 },
|
||||
"miromind/mirothinker-1-7-deepresearch": { input: 4, output: 25.0, reasoning: 25.0 },
|
||||
"miromind/mirothinker-1-7-deepresearch-mini": { input: 1.25, output: 10.0, reasoning: 10.0 },
|
||||
"mistralai/devstral-2512": { input: 0.4, output: 2.0, cached: 0.04, reasoning: 2.0 },
|
||||
"mistralai/mistral-medium-3-5": { input: 1.5, output: 7.5, reasoning: 7.5 },
|
||||
"mistralai/mistral-small-2603": { input: 0.15, output: 0.6, cached: 0.015, reasoning: 0.6 },
|
||||
"mistralai/voxtral-small-24b-2507": { input: 0.1, output: 0.3, cached: 0.01, reasoning: 0.3 },
|
||||
"moonshotai/kimi-k2.5": { input: 0.6, output: 3.0, cached: 0.1, reasoning: 3.0 },
|
||||
"moonshotai/kimi-k2.6": { input: 0.95, output: 4.0, cached: 0.16, reasoning: 4.0 },
|
||||
"moonshotai/kimi-k2.7-code": { input: 0.9286, output: 3.8571, cached: 0.1857, reasoning: 3.8571 },
|
||||
"moonshotai/kimi-k3": { input: 3.0, output: 15.0, cached: 0.3, reasoning: 15.0 },
|
||||
"nvidia/nemotron-3-super-120b-a12b": { input: 0.3, output: 0.9, cached: 0.1, reasoning: 0.9 },
|
||||
"openai/gpt-4o-mini": { input: 0.15, output: 0.6, cached: 0.075, reasoning: 0.6 },
|
||||
"openai/gpt-5": { input: 1.25, output: 10.0, cached: 0.125, reasoning: 10.0 },
|
||||
"openai/gpt-5-image": { input: 10, output: 40, cached: 2.5, reasoning: 40 },
|
||||
"openai/gpt-5-image-mini": { input: 2.5, output: 8.0, cached: 0.25, reasoning: 8.0 },
|
||||
"openai/gpt-5-mini": { input: 0.25, output: 2.0, cached: 0.025, reasoning: 2.0 },
|
||||
"openai/gpt-5.2": { input: 1.75, output: 14.0, cached: 0.175, reasoning: 14.0 },
|
||||
"openai/gpt-5.3-codex": { input: 1.75, output: 14.0, cached: 0.175, reasoning: 14.0 },
|
||||
"openai/gpt-5.4": { input: 2.5, output: 15.0, cached: 0.25, reasoning: 15.0 },
|
||||
"openai/gpt-5.4-image-2": { input: 8, output: 30.0, cached: 2.0, reasoning: 30.0 },
|
||||
"openai/gpt-5.4-mini": { input: 0.75, output: 4.5, cached: 0.075, reasoning: 4.5 },
|
||||
"openai/gpt-5.4-nano": { input: 0.2, output: 1.25, cached: 0.02, reasoning: 1.25 },
|
||||
"openai/gpt-5.4-pro": { input: 30, output: 180, reasoning: 180 },
|
||||
"openai/gpt-5.5": { input: 5.0, output: 30.0, cached: 0.5, reasoning: 30.0 },
|
||||
"openai/gpt-5.5-pro": { input: 30, output: 180, reasoning: 180 },
|
||||
"openai/gpt-5.6-luna": { input: 0.2, output: 1.2, cached: 0.02, cache_creation: 0.25, reasoning: 1.2 },
|
||||
"openai/gpt-5.6-sol": { input: 5.0, output: 30.0, cached: 0.5, cache_creation: 6.25, reasoning: 30.0 },
|
||||
"openai/gpt-5.6-terra": { input: 2, output: 12, cached: 0.2, cache_creation: 2.5, reasoning: 12 },
|
||||
"openai/gpt-audio": { input: 2.5, output: 10.0, reasoning: 10.0 },
|
||||
"openai/gpt-audio-mini": { input: 0.6, output: 2.4, reasoning: 2.4 },
|
||||
"openai/gpt-oss-120b": { input: 0.039, output: 0.18, reasoning: 0.18 },
|
||||
"qwen/qwen3-coder-next": { input: 0.12, output: 0.75, cached: 0.06, reasoning: 0.75 },
|
||||
"qwen/qwen3.5-122b-a10b": { input: 0.26, output: 2.08, reasoning: 2.08 },
|
||||
"qwen/qwen3.5-35b-a3b": { input: 0.1625, output: 1.3, reasoning: 1.3 },
|
||||
"qwen/qwen3.5-397b-a17b": { input: 0.39, output: 2.34, reasoning: 2.34 },
|
||||
"qwen/qwen3.5-9b": { input: 0.1, output: 0.15, reasoning: 0.15 },
|
||||
"qwen/qwen3.5-flash": { input: 0.1048, output: 0.4194, reasoning: 0.4194 },
|
||||
"qwen/qwen3.5-plus-02-15": { input: 0.26, output: 1.56, reasoning: 1.56 },
|
||||
"qwen/qwen3.6-plus": { input: 0.54, output: 3.21, reasoning: 3.21 },
|
||||
"qwen/qwen3.7-max": { input: 1.25, output: 3.75, cached: 0.25, reasoning: 3.75 },
|
||||
"qwen/qwen3.7-plus": { input: 0.4, output: 1.6, cached: 0.08, reasoning: 1.6 },
|
||||
"qwen/qwen3.8-max": { input: 2, output: 6, cached: 0.25, cache_creation: 2.5, reasoning: 6 },
|
||||
"qwen3.5-omni-plus": { input: 1.0, output: 5.7143, reasoning: 5.7143 },
|
||||
"qwen3.6-flash": { input: 0.171, output: 1.029, cached: 0.017, cache_creation: 0.214, reasoning: 1.029 },
|
||||
"sakana/fugu-ultra": { input: 5.0, output: 30.0, cached: 0.5, reasoning: 30.0 },
|
||||
"seed-2-0-code-preview-260328": { input: 1.0, output: 6.0, cached: 0.2, cache_creation: 0.008333, reasoning: 6.0 },
|
||||
"seed-2-0-lite-260428": { input: 0.5, output: 4.0, cached: 0.1, cache_creation: 0.008333, reasoning: 4.0 },
|
||||
"seed-2-0-mini-260428": { input: 0.2, output: 0.8, cached: 0.04, cache_creation: 0.00833, reasoning: 0.8 },
|
||||
"seed-2-0-pro-260328": { input: 1.0, output: 6.0, cached: 0.2, cache_creation: 0.008333, reasoning: 6.0 },
|
||||
"stepfun/step-3.5-flash": { input: 0.1, output: 0.3, cached: 0.02, reasoning: 0.3 },
|
||||
"stepfun/step-3.7-flash": { input: 0.2, output: 1.15, cached: 0.04, reasoning: 1.15 },
|
||||
"tencent/hy3-preview": { input: 0.066, output: 0.26, cached: 0.029, reasoning: 0.26 },
|
||||
"x-ai/grok-4.1-fast": { input: 0.2, output: 0.5, cached: 0.05, reasoning: 0.5 },
|
||||
"x-ai/grok-4.20-beta": { input: 2, output: 6, cached: 0.2, reasoning: 6 },
|
||||
"x-ai/grok-4.3": { input: 1.25, output: 2.5, cached: 0.2, reasoning: 2.5 },
|
||||
"x-ai/grok-4.5": { input: 2, output: 6, cached: 0.5, reasoning: 6 },
|
||||
"x-ai/grok-build-0.1": { input: 1.0, output: 2.0, cached: 0.2, reasoning: 2.0 },
|
||||
"xiaomi/mimo-v2-flash": { input: 0.1, output: 0.3, cached: 0.01, reasoning: 0.3 },
|
||||
"xiaomi/mimo-v2-omni": { input: 0.4, output: 2.0, cached: 0.08, reasoning: 2.0 },
|
||||
"xiaomi/mimo-v2-pro": { input: 1.0, output: 3.0, cached: 0.2, reasoning: 3.0 },
|
||||
"xiaomi/mimo-v2.5": { input: 0.4, output: 2.0, cached: 0.08, reasoning: 2.0 },
|
||||
"xiaomi/mimo-v2.5-pro": { input: 1.0, output: 3.0, cached: 0.2, reasoning: 3.0 },
|
||||
"z-ai/glm-4.5-air": { input: 0.13, output: 0.85, cached: 0.025, reasoning: 0.85 },
|
||||
"z-ai/glm-4.6": { input: 0.6, output: 2.2, cached: 0.11, reasoning: 2.2 },
|
||||
"z-ai/glm-4.6v": { input: 0.3, output: 0.9, reasoning: 0.9 },
|
||||
"z-ai/glm-4.7": { input: 0.6, output: 2.2, cached: 0.11, reasoning: 2.2 },
|
||||
"z-ai/glm-5": { input: 1.0, output: 3.2, cached: 0.2, reasoning: 3.2 },
|
||||
"z-ai/glm-5-turbo": { input: 1.2, output: 4.0, cached: 0.24, reasoning: 4.0 },
|
||||
"z-ai/glm-5.1": { input: 1.05, output: 3.5, cached: 0.525, reasoning: 3.5 },
|
||||
"z-ai/glm-5.2": { input: 1.4, output: 4.4, cached: 0.26, reasoning: 4.4 },
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -140,11 +275,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 +296,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 } },
|
||||
@@ -183,6 +319,7 @@ export const PATTERN_PRICING = [
|
||||
|
||||
// --- Kimi ---
|
||||
{ pattern: "kimi-*-thinking", pricing: { input: 1.80, output: 7.20, cached: 0.90, reasoning: 10.80, cache_creation: 1.80 } },
|
||||
{ pattern: "kimi-k3*", pricing: { input: 3.00, output: 15.00, cached: 0.30, reasoning: 15.00, cache_creation: 3.00 } },
|
||||
{ pattern: "kimi-k2*", pricing: { input: 1.20, output: 4.80, cached: 0.60, reasoning: 7.20, cache_creation: 1.20 } },
|
||||
{ pattern: "kimi-*", pricing: { input: 1.00, output: 4.00, cached: 0.50, reasoning: 6.00, cache_creation: 1.00 } },
|
||||
|
||||
|
||||
@@ -3,13 +3,13 @@ export default {
|
||||
priority: 10,
|
||||
alias: "alicode-intl",
|
||||
display: {
|
||||
name: "Alibaba Intl",
|
||||
name: "Alibaba Coding",
|
||||
icon: "cloud",
|
||||
color: "#FF6A00",
|
||||
textIcon: "ALi",
|
||||
website: "https://modelstudio.console.alibabacloud.com",
|
||||
website: "https://www.alibabacloud.com/product/coding",
|
||||
notice: {
|
||||
apiKeyUrl: "https://modelstudio.console.alibabacloud.com/?apiKey=1",
|
||||
apiKeyUrl: "https://www.alibabacloud.com/product/coding",
|
||||
},
|
||||
},
|
||||
category: "apikey",
|
||||
|
||||
32
open-sse/providers/registry/alims-intl.js
Normal file
32
open-sse/providers/registry/alims-intl.js
Normal file
@@ -0,0 +1,32 @@
|
||||
// Model Studio Intl — standard DashScope API keys (sk-...), NOT Coding Plan keys.
|
||||
// Sibling of alicode-intl (Coding Plan). Two key types use two different hosts.
|
||||
export default {
|
||||
id: "alims-intl",
|
||||
priority: 11,
|
||||
alias: "alims-intl",
|
||||
display: {
|
||||
name: "Alibaba Studio",
|
||||
icon: "cloud",
|
||||
color: "#FF6A00",
|
||||
textIcon: "ALi",
|
||||
website: "https://modelstudio.console.alibabacloud.com",
|
||||
notice: {
|
||||
apiKeyUrl: "https://modelstudio.console.alibabacloud.com/?apiKey=1",
|
||||
},
|
||||
},
|
||||
category: "apikey",
|
||||
transport: {
|
||||
baseUrl: "https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions",
|
||||
headers: {},
|
||||
quirks: { preserveCacheControl: true },
|
||||
},
|
||||
models: [
|
||||
{ id: "qwen3.5-plus", name: "Qwen3.5 Plus" },
|
||||
{ id: "kimi-k2.5", name: "Kimi K2.5" },
|
||||
{ id: "glm-5", name: "GLM 5" },
|
||||
{ id: "MiniMax-M2.5", name: "MiniMax M2.5" },
|
||||
{ id: "qwen3-coder-next", name: "Qwen3 Coder Next" },
|
||||
{ id: "qwen3-coder-plus", name: "Qwen3 Coder Plus" },
|
||||
{ id: "glm-4.7", name: "GLM 4.7" },
|
||||
],
|
||||
};
|
||||
35
open-sse/providers/registry/alitp-intl.js
Normal file
35
open-sse/providers/registry/alitp-intl.js
Normal file
@@ -0,0 +1,35 @@
|
||||
// Token Plan — credit subscription keys on token-plan.<region>.maas.aliyuncs.com.
|
||||
// Fourth Alibaba key type: Coding Plan (alicode/alicode-intl) and Model Studio
|
||||
// (alims-intl) both reject these keys, and they reject Model Studio keys back.
|
||||
// Singapore is the only region that serves the plan; eu-central-1 answers
|
||||
// IllegalEndpoint. The Anthropic surface (/apps/anthropic/v1/messages) is not
|
||||
// authorized for this plan, so OpenAI-compatible mode is the only transport.
|
||||
export default {
|
||||
id: "alitp-intl",
|
||||
priority: 11,
|
||||
alias: "alitp-intl",
|
||||
display: {
|
||||
name: "Alibaba Token Plan",
|
||||
icon: "cloud",
|
||||
color: "#FF6A00",
|
||||
textIcon: "ATP",
|
||||
website: "https://www.alibabacloud.com/campaign/ai-landing-page-token",
|
||||
notice: {
|
||||
apiKeyUrl: "https://modelstudio.console.alibabacloud.com/?apiKey=1",
|
||||
},
|
||||
},
|
||||
category: "apikey",
|
||||
transport: {
|
||||
baseUrl: "https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1/chat/completions",
|
||||
headers: {},
|
||||
quirks: { preserveCacheControl: true },
|
||||
},
|
||||
models: [
|
||||
{ id: "qwen3.8-max-preview", name: "Qwen3.8 Max Preview" },
|
||||
{ id: "qwen3.7-max", name: "Qwen3.7 Max" },
|
||||
{ id: "qwen3.7-plus", name: "Qwen3.7 Plus" },
|
||||
{ id: "qwen3.6-flash", name: "Qwen3.6 Flash" },
|
||||
{ id: "glm-5.2", name: "GLM 5.2" },
|
||||
{ id: "deepseek-v4-pro", name: "DeepSeek V4 Pro" },
|
||||
],
|
||||
};
|
||||
@@ -1,5 +1,3 @@
|
||||
import { CLAUDE_API_HEADERS } from "../shared.js";
|
||||
|
||||
export default {
|
||||
id: "anthropic",
|
||||
priority: 30,
|
||||
@@ -19,7 +17,7 @@ export default {
|
||||
baseUrl: "https://api.anthropic.com/v1/messages",
|
||||
format: "claude",
|
||||
headers: {
|
||||
"Anthropic-Version": "2023-06-01",
|
||||
"anthropic-version": "2023-06-01",
|
||||
"Anthropic-Beta": "claude-code-20250219,interleaved-thinking-2025-05-14",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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": {
|
||||
@@ -40,6 +36,7 @@ export default {
|
||||
},
|
||||
},
|
||||
usage: {
|
||||
// Discovery (quota/project) on PROD; daily host rejects these.
|
||||
quotaApiUrl: "https://cloudcode-pa.googleapis.com/v1internal:fetchAvailableModels",
|
||||
loadProjectApiUrl: "https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",
|
||||
tokenUrl: "https://oauth2.googleapis.com/token",
|
||||
@@ -48,6 +45,13 @@ export default {
|
||||
clientSecret: "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",
|
||||
},
|
||||
models: [
|
||||
{ id: "gemini-3.7-flash-high", name: "Gemini 3.7 Flash (High)", upstreamModelId: "gemini-3.7-flash-tiered(high)" },
|
||||
{ id: "gemini-3.7-flash-medium", name: "Gemini 3.7 Flash (Medium)", upstreamModelId: "gemini-3.7-flash-tiered(medium)" },
|
||||
{ id: "gemini-3.7-flash-low", name: "Gemini 3.7 Flash (Low)", upstreamModelId: "gemini-3.7-flash-tiered(low)" },
|
||||
{ id: "gemini-3.6-flash-high", name: "Gemini 3.6 Flash (High)", upstreamModelId: "gemini-3.6-flash-tiered(high)" },
|
||||
{ id: "gemini-3.6-flash-medium", name: "Gemini 3.6 Flash (Medium)", upstreamModelId: "gemini-3.6-flash-tiered(medium)" },
|
||||
{ id: "gemini-3.6-flash-low", name: "Gemini 3.6 Flash (Low)", upstreamModelId: "gemini-3.6-flash-tiered(low)" },
|
||||
{ id: "gemini-3.5-flash-high", name: "Gemini 3.5 Flash (High)" },
|
||||
{ id: "gemini-3-flash-agent", name: "Gemini 3.5 Flash (High)" },
|
||||
{ id: "gemini-3.5-flash-low", name: "Gemini 3.5 Flash (Medium)" },
|
||||
{ id: "gemini-3.5-flash-extra-low", name: "Gemini 3.5 Flash (Low)" },
|
||||
@@ -71,12 +75,11 @@ export default {
|
||||
"https://www.googleapis.com/auth/cclog",
|
||||
"https://www.googleapis.com/auth/experimentsandconfigs",
|
||||
],
|
||||
apiEndpoint: "https://cloudcode-pa.googleapis.com",
|
||||
apiEndpoint: "https://daily-cloudcode-pa.googleapis.com",
|
||||
apiVersion: "v1internal",
|
||||
loadCodeAssistEndpoint: "https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",
|
||||
onboardUserEndpoint: "https://cloudcode-pa.googleapis.com/v1internal:onboardUser",
|
||||
loadCodeAssistUserAgent: "google-api-nodejs-client/9.15.1",
|
||||
loadCodeAssistApiClient: "google-cloud-sdk vscode_cloudshelleditor/0.1",
|
||||
loadCodeAssistUserAgent: ANTIGRAVITY_IDE_USER_AGENT,
|
||||
refreshLeadMs: 300000,
|
||||
},
|
||||
features: {
|
||||
|
||||
36
open-sse/providers/registry/api-airforce.js
Normal file
36
open-sse/providers/registry/api-airforce.js
Normal file
@@ -0,0 +1,36 @@
|
||||
export default {
|
||||
id: "api-airforce",
|
||||
alias: "af",
|
||||
aliases: [
|
||||
"airforce",
|
||||
],
|
||||
uiAlias: "af",
|
||||
display: {
|
||||
name: "API.airforce",
|
||||
icon: "flight",
|
||||
color: "#0EA5E9",
|
||||
textIcon: "AF",
|
||||
website: "https://api.airforce",
|
||||
notice: {
|
||||
apiKeyUrl: "https://api.airforce",
|
||||
},
|
||||
},
|
||||
category: "freeTier",
|
||||
authType: "apikey",
|
||||
authModes: [
|
||||
"apikey",
|
||||
],
|
||||
transport: {
|
||||
baseUrl: "https://api.airforce/v1/chat/completions",
|
||||
validateUrl: "https://api.airforce/v1/models",
|
||||
headers: {
|
||||
"HTTP-Referer": "https://endpoint-proxy.local",
|
||||
"X-Title": "Endpoint Proxy",
|
||||
},
|
||||
},
|
||||
models: [
|
||||
{ id: "anthropic/claude-3.7-sonnet", name: "Claude 3.7 Sonnet (Free)", contextLength: 200000 },
|
||||
{ id: "moonshot/kimi-k2.6", name: "Kimi K2.6 (Free)", contextLength: 262144 },
|
||||
{ id: "google/gemini-2.5-flash", name: "Gemini 2.5 Flash (Free)", contextLength: 1048576 },
|
||||
],
|
||||
};
|
||||
33
open-sse/providers/registry/baidu.js
Normal file
33
open-sse/providers/registry/baidu.js
Normal file
@@ -0,0 +1,33 @@
|
||||
export default {
|
||||
id: "baidu",
|
||||
alias: "qianfan",
|
||||
aliases: ["qianfan", "ernie", "baidu-qianfan"],
|
||||
uiAlias: "qianfan",
|
||||
category: "apikey",
|
||||
authType: "apikey",
|
||||
authModes: ["apikey"],
|
||||
display: {
|
||||
name: "Baidu Qianfan",
|
||||
icon: "search",
|
||||
color: "#2932E1",
|
||||
textIcon: "BD",
|
||||
website: "https://cloud.baidu.com/product/qianfan.html",
|
||||
notice: {
|
||||
apiKeyUrl:
|
||||
"https://console.bce.baidu.com/qianfan/ais/console/applicationConsole/application",
|
||||
},
|
||||
},
|
||||
transport: {
|
||||
baseUrl: "https://qianfan.baidubce.com/v2/chat/completions",
|
||||
validateUrl: "https://qianfan.baidubce.com/v2/models",
|
||||
},
|
||||
models: [
|
||||
{ id: "deepseek-v4-pro", name: "DeepSeek V4 Pro", contextLength: 1048576 },
|
||||
{ id: "deepseek-v4-flash", name: "DeepSeek V4 Flash", contextLength: 1048576 },
|
||||
{ id: "glm-5.2", name: "GLM 5.2", contextLength: 512000 },
|
||||
{ id: "glm-5.1", name: "GLM 5.1", contextLength: 198000 },
|
||||
{ id: "kimi-k2.6", name: "Kimi K2.6", contextLength: 262144 },
|
||||
{ id: "qwen3.5-397b-a17b", name: "Qwen 3.5 397B A17B", contextLength: 262144 },
|
||||
{ id: "qwen3.5-27b", name: "Qwen 3.5 27B", contextLength: 262144 },
|
||||
],
|
||||
};
|
||||
47
open-sse/providers/registry/bazaarlink.js
Normal file
47
open-sse/providers/registry/bazaarlink.js
Normal file
@@ -0,0 +1,47 @@
|
||||
export default {
|
||||
id: "bazaarlink",
|
||||
alias: "bzl",
|
||||
aliases: ["bazaar-link"],
|
||||
uiAlias: "bzl",
|
||||
category: "freeTier",
|
||||
authType: "apikey",
|
||||
authModes: ["apikey"],
|
||||
display: {
|
||||
name: "Bazaarlink",
|
||||
icon: "storefront",
|
||||
color: "#DC2626",
|
||||
textIcon: "BZ",
|
||||
website: "https://bazaarlink.ai",
|
||||
notice: { apiKeyUrl: "https://bazaarlink.ai" },
|
||||
},
|
||||
transport: {
|
||||
baseUrl: "https://bazaarlink.ai/api/v1/chat/completions",
|
||||
validateUrl: "https://bazaarlink.ai/api/v1/models",
|
||||
},
|
||||
models: [
|
||||
{ id: "auto:free", name: "Auto Free (Zero Cost)" },
|
||||
{ id: "claude-opus-4.7", name: "Claude Opus 4.7", contextLength: 1000000 },
|
||||
{ id: "claude-sonnet-4.6", name: "Claude Sonnet 4.6", contextLength: 1000000 },
|
||||
{ id: "claude-haiku-4.5", name: "Claude Haiku 4.5", contextLength: 200000 },
|
||||
{ id: "gpt-5.5", name: "GPT-5.5", contextLength: 1050000 },
|
||||
{ id: "gpt-5.4", name: "GPT-5.4", contextLength: 1050000 },
|
||||
{ id: "gpt-5.4-mini", name: "GPT-5.4 Mini", contextLength: 400000 },
|
||||
{ id: "gpt-5.4-nano", name: "GPT-5.4 Nano", contextLength: 400000 },
|
||||
{ id: "grok-4.3", name: "Grok 4.3", contextLength: 1000000 },
|
||||
{ id: "grok-4.20", name: "Grok 4.20", contextLength: 2000000 },
|
||||
{ id: "gemini-3.1-pro-preview", name: "Gemini 3.1 Pro", contextLength: 1048576 },
|
||||
{ id: "gemini-3-flash-preview", name: "Gemini 3 Flash", contextLength: 1048576 },
|
||||
{ id: "gemini-3.1-flash-lite-preview", name: "Gemini 3.1 Flash Lite", contextLength: 1048576 },
|
||||
{ id: "kimi-k2.6", name: "Kimi K2.6", contextLength: 262144 },
|
||||
{ id: "kimi-k2.5", name: "Kimi K2.5", contextLength: 262144 },
|
||||
{ id: "glm-5.1", name: "GLM 5.1", contextLength: 204800 },
|
||||
{ id: "glm-5", name: "GLM 5", contextLength: 204800 },
|
||||
{ id: "mimo-v2.5-pro", name: "MiMo-V2.5-Pro", contextLength: 1050000 },
|
||||
{ id: "mimo-v2.5", name: "MiMo-V2.5", contextLength: 1050000 },
|
||||
{ id: "minimax-m3", name: "MiniMax M3", contextLength: 1048576 },
|
||||
{ id: "minimax-m2.7", name: "MiniMax M2.7", contextLength: 204800 },
|
||||
{ id: "minimax-m2.5", name: "MiniMax M2.5", contextLength: 204800 },
|
||||
{ id: "qwen3.6-plus", name: "Qwen 3.6 Plus", contextLength: 1000000 },
|
||||
{ id: "nemotron-3-super-120b-a12b", name: "Nemotron 3 Super", contextLength: 1000000 },
|
||||
],
|
||||
};
|
||||
38
open-sse/providers/registry/bluesminds.js
Normal file
38
open-sse/providers/registry/bluesminds.js
Normal file
@@ -0,0 +1,38 @@
|
||||
export default {
|
||||
id: "bluesminds",
|
||||
alias: "bm",
|
||||
aliases: ["blue-sminds"],
|
||||
uiAlias: "bm",
|
||||
hidden: true,
|
||||
display: {
|
||||
name: "BluesMinds",
|
||||
icon: "psychology",
|
||||
color: "#2563EB",
|
||||
textIcon: "BM",
|
||||
website: "https://bluesminds.com",
|
||||
notice: { apiKeyUrl: "https://bluesminds.com" },
|
||||
},
|
||||
category: "apikey",
|
||||
authType: "apikey",
|
||||
authModes: ["apikey"],
|
||||
transport: {
|
||||
baseUrl: "https://api.bluesminds.com/v1/chat/completions",
|
||||
validateUrl: "https://api.bluesminds.com/v1/models",
|
||||
},
|
||||
models: [
|
||||
{ id: "gpt-4.1", name: "GPT-4.1", contextLength: 1048576 },
|
||||
{ id: "gpt-4.1-mini", name: "GPT-4.1 Mini", contextLength: 1048576 },
|
||||
{ id: "gpt-4.1-nano", name: "GPT-4.1 Nano", contextLength: 1048576 },
|
||||
{ id: "claude-sonnet-4-5", name: "Claude Sonnet 4.5", contextLength: 200000 },
|
||||
{ id: "claude-haiku-4-5", name: "Claude Haiku 4.5", contextLength: 200000 },
|
||||
{ id: "gemini-2.0-flash", name: "Gemini 2.0 Flash", contextLength: 1048576 },
|
||||
{ id: "gemini-2.0-flash-exp", name: "Gemini 2.0 Flash (Exp)", contextLength: 1048576 },
|
||||
{ id: "qwen-turbo", name: "Qwen Turbo", contextLength: 1000000 },
|
||||
{ id: "kimi-k2", name: "Kimi K2", contextLength: 262144 },
|
||||
{ id: "kimi-k2-thinking", name: "Kimi K2 Thinking", contextLength: 262144 },
|
||||
{ id: "glm-4.7", name: "GLM 4.7", contextLength: 204800 },
|
||||
{ id: "minimax-m2.5", name: "MiniMax M2.5", contextLength: 204800 },
|
||||
{ id: "claude-opus-4-5", name: "Claude Opus 4.5 (VIP)", contextLength: 200000 },
|
||||
{ id: "gemini-2.5-pro", name: "Gemini 2.5 Pro (VIP)", contextLength: 1048576 },
|
||||
],
|
||||
};
|
||||
@@ -49,9 +49,6 @@ export default {
|
||||
header: "Authorization",
|
||||
scheme: "bearer",
|
||||
},
|
||||
hooks: [
|
||||
"claudeOverlay",
|
||||
],
|
||||
},
|
||||
usage: {
|
||||
oauthUrl: "https://api.anthropic.com/api/oauth/usage",
|
||||
@@ -60,12 +57,9 @@ export default {
|
||||
},
|
||||
},
|
||||
models: [
|
||||
{ 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-opus-5", name: "Claude Opus 5" },
|
||||
{ id: "claude-fable-5", name: "Claude Fable 5" },
|
||||
{ id: "claude-sonnet-5", name: "Claude Sonnet 5" },
|
||||
{ id: "claude-haiku-4-5-20251001", name: "Claude 4.5 Haiku" },
|
||||
],
|
||||
oauth: {
|
||||
|
||||
@@ -19,6 +19,8 @@ export default {
|
||||
},
|
||||
},
|
||||
category: "freeTier",
|
||||
authType: "apikey",
|
||||
authModes: ["apikey"],
|
||||
hasProviderSpecificData: true,
|
||||
transport: {
|
||||
baseUrl: "https://api.cloudflare.com/client/v4/accounts/{accountId}/ai/v1/chat/completions",
|
||||
|
||||
77
open-sse/providers/registry/codebuddy-intl.js
Normal file
77
open-sse/providers/registry/codebuddy-intl.js
Normal file
@@ -0,0 +1,77 @@
|
||||
// CodeBuddy international (codebuddy.ai) — mirrors codebuddy-cn registry shape,
|
||||
// swapping the Tencent CN domain for the .ai endpoint set. All OAuth/plugin URLs
|
||||
// use the /v2/plugin prefix with platform=ide (CN uses platform=CLI).
|
||||
export default {
|
||||
id: "codebuddy-intl",
|
||||
alias: "cbai",
|
||||
uiAlias: "cbai",
|
||||
hidden: false,
|
||||
priority: 90,
|
||||
display: {
|
||||
name: "CodeBuddy",
|
||||
icon: "smart_toy",
|
||||
color: "#006EFF",
|
||||
website: "https://www.codebuddy.ai",
|
||||
notice: {
|
||||
signupUrl: "https://www.codebuddy.ai",
|
||||
},
|
||||
},
|
||||
category: "oauth",
|
||||
authModes: ["oauth", "apikey"],
|
||||
hasOAuth: true,
|
||||
transport: {
|
||||
// Chat gateway is OpenAI-compatible SSE (same /v2/chat/completions path as CN).
|
||||
baseUrl: "https://www.codebuddy.ai/v2/chat/completions",
|
||||
forceStream: true,
|
||||
// CodeBuddy intl speaks the same unified OpenAI reasoning_effort shape as CN.
|
||||
thinkingFormat: "openai",
|
||||
headers: {
|
||||
"User-Agent": "IDE/2.108.1 CodeBuddy/2.108.1",
|
||||
"X-Product": "SaaS",
|
||||
"X-IDE-Type": "IDE",
|
||||
"X-IDE-Name": "IDE",
|
||||
"x-requested-with": "XMLHttpRequest",
|
||||
"x-codebuddy-request": "1",
|
||||
},
|
||||
auth: {
|
||||
combined: true,
|
||||
header: "Authorization",
|
||||
scheme: "bearer",
|
||||
},
|
||||
// Intl billing endpoint mirrors CN shape (data.Response.Data.Accounts[]).
|
||||
usage: {
|
||||
url: "https://www.codebuddy.ai/v2/billing/meter/get-user-resource",
|
||||
},
|
||||
},
|
||||
// Same model lineup exposed by the CN gateway — intl backend is the same catalog.
|
||||
models: [
|
||||
{ id: "glm-5.2", name: "GLM-5.2" },
|
||||
{ id: "glm-5.1", name: "GLM-5.1" },
|
||||
{ id: "glm-5.0", name: "GLM-5.0" },
|
||||
{ id: "glm-5.0-turbo", name: "GLM-5.0-Turbo" },
|
||||
{ id: "glm-5v-turbo", name: "GLM-5v-Turbo" },
|
||||
{ id: "glm-4.7", name: "GLM-4.7" },
|
||||
{ id: "minimax-m3", name: "MiniMax-M3" },
|
||||
{ id: "minimax-m2.7", name: "MiniMax-M2.7" },
|
||||
{ id: "kimi-k2.7", name: "Kimi-K2.7-Code" },
|
||||
{ id: "kimi-k2.6", name: "Kimi-K2.6" },
|
||||
{ id: "kimi-k2.5", name: "Kimi-K2.5" },
|
||||
{ id: "hy3-preview", name: "Hy3 Preview" },
|
||||
{ id: "deepseek-v4-pro", name: "DeepSeek-V4-Pro" },
|
||||
{ id: "deepseek-v4-flash", name: "DeepSeek-V4-Flash" },
|
||||
{ id: "deepseek-v3-2-volc", name: "DeepSeek-V3.2" },
|
||||
],
|
||||
oauth: {
|
||||
baseUrl: "https://www.codebuddy.ai",
|
||||
stateUrl: "https://www.codebuddy.ai/v2/plugin/auth/state",
|
||||
tokenUrl: "https://www.codebuddy.ai/v2/plugin/auth/token",
|
||||
refreshUrl: "https://www.codebuddy.ai/v2/plugin/auth/token/refresh",
|
||||
userAgent: "IDE/2.63.2 CodeBuddy/2.63.2",
|
||||
platform: "ide",
|
||||
pollInterval: 5000,
|
||||
},
|
||||
features: {
|
||||
usage: true,
|
||||
usageApikey: true,
|
||||
},
|
||||
};
|
||||
@@ -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" },
|
||||
|
||||
@@ -23,7 +23,7 @@ export default {
|
||||
"Content-Type": "application/connect+proto",
|
||||
"User-Agent": "connect-es/1.6.1",
|
||||
},
|
||||
clientVersion: "3.1.0",
|
||||
clientVersion: "3.12.17",
|
||||
},
|
||||
models: [
|
||||
{ id: "default", name: "Auto (Server Picks)" },
|
||||
@@ -44,11 +44,11 @@ export default {
|
||||
oauth: {
|
||||
apiEndpoint: "https://api2.cursor.sh",
|
||||
chatEndpoint: "/aiserver.v1.ChatService/StreamUnifiedChatWithTools",
|
||||
modelsEndpoint: "/aiserver.v1.AiService/GetDefaultModelNudgeData",
|
||||
modelsEndpoint: "/agent.v1.AgentService/GetUsableModels",
|
||||
api3Endpoint: "https://api3.cursor.sh",
|
||||
agentEndpoint: "https://agent.api5.cursor.sh",
|
||||
agentNonPrivacyEndpoint: "https://agentn.api5.cursor.sh",
|
||||
clientVersion: "3.1.0",
|
||||
clientVersion: "3.12.17",
|
||||
clientType: "ide",
|
||||
dbKeys: {
|
||||
accessToken: "cursorAuth/accessToken",
|
||||
|
||||
@@ -48,4 +48,8 @@ export default {
|
||||
{ id: "deepseek-chat", name: "DeepSeek V3.2 Chat" },
|
||||
{ id: "deepseek-reasoner", name: "DeepSeek V3.2 Reasoner" },
|
||||
],
|
||||
features: {
|
||||
usage: true,
|
||||
usageApikey: true,
|
||||
},
|
||||
};
|
||||
|
||||
63
open-sse/providers/registry/devin-cli.js
Normal file
63
open-sse/providers/registry/devin-cli.js
Normal file
@@ -0,0 +1,63 @@
|
||||
export default {
|
||||
id: "devin-cli",
|
||||
alias: "dv",
|
||||
aliases: ["devin"],
|
||||
uiAlias: "dv",
|
||||
hidden: true,
|
||||
display: {
|
||||
name: "Devin CLI",
|
||||
icon: "smart_toy",
|
||||
color: "#6366F1",
|
||||
textIcon: "DV",
|
||||
website: "https://devin.ai",
|
||||
notice: {
|
||||
signupUrl: "https://cli.devin.ai",
|
||||
text: "Install: `curl -fsSL https://cli.devin.ai/install.sh | bash` (macOS: `brew install --cask devin-cli`, Windows PowerShell: `irm https://static.devin.ai/cli/setup.ps1 | iex`). Then run `devin auth login`. No API key needed.",
|
||||
},
|
||||
},
|
||||
category: "free",
|
||||
authType: "none",
|
||||
noAuth: true,
|
||||
authModes: ["none"],
|
||||
transport: {
|
||||
baseUrl: "devin://acp/stdio",
|
||||
format: "openai",
|
||||
},
|
||||
models: [
|
||||
{ id: "swe-1.6-fast", name: "SWE-1.6 Fast" },
|
||||
{ id: "swe-1.6", name: "SWE-1.6" },
|
||||
{ id: "swe-1.5-fast", name: "SWE-1.5 Fast" },
|
||||
{ id: "swe-1.5", name: "SWE-1.5" },
|
||||
{ id: "claude-opus-4.7-max", name: "Claude Opus 4.7 Max", contextLength: 200000 },
|
||||
{ id: "claude-opus-4.7-high", name: "Claude Opus 4.7 High", contextLength: 200000 },
|
||||
{ id: "claude-opus-4.7-medium", name: "Claude Opus 4.7 Medium", contextLength: 200000 },
|
||||
{ id: "claude-opus-4.7-low", name: "Claude Opus 4.7 Low", contextLength: 200000 },
|
||||
{ id: "claude-sonnet-4.6-thinking-1m", name: "Claude Sonnet 4.6 Thinking 1M", contextLength: 1000000 },
|
||||
{ id: "claude-sonnet-4.6-thinking", name: "Claude Sonnet 4.6 Thinking", contextLength: 200000 },
|
||||
{ id: "claude-sonnet-4.6", name: "Claude Sonnet 4.6", contextLength: 200000 },
|
||||
{ id: "claude-opus-4.6-thinking", name: "Claude Opus 4.6 Thinking", contextLength: 200000 },
|
||||
{ id: "claude-opus-4.6", name: "Claude Opus 4.6", contextLength: 200000 },
|
||||
{ id: "claude-sonnet-4.5", name: "Claude Sonnet 4.5", contextLength: 200000 },
|
||||
{ id: "claude-haiku-4.5", name: "Claude Haiku 4.5", contextLength: 200000 },
|
||||
{ id: "gpt-5.5-xhigh", name: "GPT-5.5 XHigh", contextLength: 200000 },
|
||||
{ id: "gpt-5.5-high", name: "GPT-5.5 High", contextLength: 200000 },
|
||||
{ id: "gpt-5.5-medium", name: "GPT-5.5 Medium", contextLength: 200000 },
|
||||
{ id: "gpt-5.5-low", name: "GPT-5.5 Low", contextLength: 200000 },
|
||||
{ id: "gpt-5.4-high", name: "GPT-5.4 High", contextLength: 200000 },
|
||||
{ id: "gpt-5.4-medium", name: "GPT-5.4 Medium", contextLength: 200000 },
|
||||
{ id: "gpt-5.4-low", name: "GPT-5.4 Low", contextLength: 200000 },
|
||||
{ id: "gpt-5.3-codex-high", name: "GPT-5.3 Codex High", contextLength: 200000 },
|
||||
{ id: "gpt-5.3-codex-medium", name: "GPT-5.3 Codex Medium", contextLength: 200000 },
|
||||
{ id: "gpt-5.3-codex-low", name: "GPT-5.3 Codex Low", contextLength: 200000 },
|
||||
{ id: "gpt-5.2-high", name: "GPT-5.2 High", contextLength: 200000 },
|
||||
{ id: "gpt-5.2-medium", name: "GPT-5.2 Medium", contextLength: 200000 },
|
||||
{ id: "gpt-5.2-low", name: "GPT-5.2 Low", contextLength: 200000 },
|
||||
{ id: "gemini-3.1-pro-high", name: "Gemini 3.1 Pro High", contextLength: 1000000 },
|
||||
{ id: "gemini-3.1-pro-low", name: "Gemini 3.1 Pro Low", contextLength: 1000000 },
|
||||
{ id: "gemini-3.0-flash-high", name: "Gemini 3 Flash High", contextLength: 1000000 },
|
||||
{ id: "gemini-2.5-pro", name: "Gemini 2.5 Pro", contextLength: 1000000 },
|
||||
{ id: "deepseek-v4", name: "DeepSeek V4", contextLength: 1048576 },
|
||||
{ id: "kimi-k2.6", name: "Kimi K2.6", contextLength: 262144 },
|
||||
{ id: "glm-5.1", name: "GLM-5.1", contextLength: 204800 },
|
||||
],
|
||||
};
|
||||
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" },
|
||||
],
|
||||
};
|
||||
31
open-sse/providers/registry/fish-audio.js
Normal file
31
open-sse/providers/registry/fish-audio.js
Normal file
@@ -0,0 +1,31 @@
|
||||
// Fish Audio TTS — the model id travels in an HTTP `model` header rather than the
|
||||
// JSON body, and the voice is a reference_id (a cloned or preset voice model).
|
||||
export default {
|
||||
id: "fish-audio",
|
||||
alias: "fish",
|
||||
display: {
|
||||
name: "Fish Audio",
|
||||
icon: "record_voice_over",
|
||||
color: "#1E9BF0",
|
||||
textIcon: "FA",
|
||||
website: "https://fish.audio",
|
||||
notice: {
|
||||
apiKeyUrl: "https://fish.audio/app/api-keys/",
|
||||
},
|
||||
},
|
||||
category: "apikey",
|
||||
authType: "apikey",
|
||||
serviceKinds: ["tts"],
|
||||
ttsConfig: {
|
||||
baseUrl: "https://api.fish.audio/v1/tts",
|
||||
authType: "apikey",
|
||||
authHeader: "bearer",
|
||||
format: "fish-audio",
|
||||
models: [
|
||||
{ id: "s2.1-pro-free", name: "S2.1 Pro Free" },
|
||||
{ id: "s2.1-pro", name: "S2.1 Pro" },
|
||||
{ id: "s2-pro", name: "S2 Pro" },
|
||||
{ id: "s1", name: "S1" },
|
||||
],
|
||||
},
|
||||
};
|
||||
@@ -16,6 +16,8 @@ export default {
|
||||
},
|
||||
},
|
||||
category: "freeTier",
|
||||
authType: "apikey",
|
||||
authModes: ["apikey"],
|
||||
mediaPriority: 1,
|
||||
transport: {
|
||||
baseUrl: "https://generativelanguage.googleapis.com/v1beta/models",
|
||||
@@ -34,6 +36,9 @@ export default {
|
||||
},
|
||||
},
|
||||
models: [
|
||||
{ id: "gemini-3.7-flash", name: "Gemini 3.7 Flash" },
|
||||
{ id: "gemini-3.6-flash", name: "Gemini 3.6 Flash" },
|
||||
{ id: "gemini-3.5-flash-lite", name: "Gemini 3.5 Flash Lite" },
|
||||
{ id: "gemini-3.1-pro-preview", name: "Gemini 3.1 Pro Preview" },
|
||||
{ id: "gemini-3.1-flash-lite-preview", name: "Gemini 3.1 Flash Lite Preview" },
|
||||
{ id: "gemini-3-flash-preview", name: "Gemini 3 Flash Preview" },
|
||||
|
||||
@@ -18,6 +18,7 @@ export default {
|
||||
transport: {
|
||||
baseUrl: "https://api.githubcopilot.com/chat/completions",
|
||||
responsesUrl: "https://api.githubcopilot.com/responses",
|
||||
messagesUrl: "https://api.githubcopilot.com/v1/messages",
|
||||
headers: {
|
||||
"copilot-integration-id": "vscode-chat",
|
||||
"editor-version": "vscode/1.110.0",
|
||||
@@ -46,6 +47,14 @@ export default {
|
||||
{ id: "gpt-5.3-codex", name: "GPT-5.3 Codex" },
|
||||
{ id: "gpt-5.4", name: "GPT-5.4" },
|
||||
{ id: "gpt-5.4-mini", name: "GPT-5.4 Mini" },
|
||||
// Note: routing to Copilot's Anthropic-native /v1/messages shim (see
|
||||
// executors/github.js) is decided by model-NAME pattern at request time, not by
|
||||
// a static targetFormat field here — Copilot's live model catalog (see
|
||||
// services/copilotModels.js) regularly exposes claude-* models this static list
|
||||
// hasn't caught up with yet (e.g. claude-opus-4.8), and a static per-entry
|
||||
// targetFormat would silently miss those while also double-translating requests
|
||||
// for models that ARE listed here (chatCore.js would pre-translate to Claude
|
||||
// shape, then the executor would translate again). Keep these as plain entries.
|
||||
{ id: "claude-haiku-4.5", name: "Claude Haiku 4.5" },
|
||||
{ id: "claude-opus-4.5", name: "Claude Opus 4.5" },
|
||||
{ id: "claude-sonnet-4.5", name: "Claude Sonnet 4.5" },
|
||||
|
||||
@@ -21,6 +21,7 @@ export default {
|
||||
},
|
||||
},
|
||||
models: [
|
||||
{ id: "glm-5.3", name: "GLM 5.3" },
|
||||
{ id: "glm-5.2", name: "GLM 5.2" },
|
||||
{ id: "glm-5.1", name: "GLM 5.1" },
|
||||
{ id: "glm-5", name: "GLM 5" },
|
||||
|
||||
@@ -45,6 +45,7 @@ export default {
|
||||
},
|
||||
],
|
||||
models: [
|
||||
{ id: "glm-5.3", name: "GLM 5.3" },
|
||||
{ id: "glm-5.2", name: "GLM 5.2" },
|
||||
{ id: "glm-5.1", name: "GLM 5.1" },
|
||||
{ id: "glm-5", name: "GLM 5" },
|
||||
|
||||
96
open-sse/providers/registry/grok-cli.js
Normal file
96
open-sse/providers/registry/grok-cli.js
Normal file
@@ -0,0 +1,96 @@
|
||||
/**
|
||||
* Grok CLI / Grok Build (cli-chat-proxy.grok.com)
|
||||
*
|
||||
* Source of truth: wire capture of official @xai-official/grok 0.2.99
|
||||
* talking to https://cli-chat-proxy.grok.com (OpenAI Responses API).
|
||||
*
|
||||
* Distinct from:
|
||||
* - `xai` → api.x.ai (API key / xAI API OAuth PKCE)
|
||||
* - `grok-web` → grok.com web SSO cookie
|
||||
*/
|
||||
import {
|
||||
GROK_CLI_BASE_URL,
|
||||
GROK_CLI_CLIENT_IDENTIFIER,
|
||||
GROK_CLI_MODEL,
|
||||
GROK_CLI_USER_AGENT,
|
||||
GROK_CLI_VERSION,
|
||||
} from "../../config/grokCli.js";
|
||||
|
||||
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", "xhigh"],
|
||||
defaultMode: "high",
|
||||
},
|
||||
transport: {
|
||||
baseUrl: `${GROK_CLI_BASE_URL}/responses`,
|
||||
format: "openai-responses",
|
||||
forceStream: true,
|
||||
modelsUrl: `${GROK_CLI_BASE_URL}/models`,
|
||||
userUrl: `${GROK_CLI_BASE_URL}/user`,
|
||||
billingUrl: `${GROK_CLI_BASE_URL}/billing`,
|
||||
clientVersion: GROK_CLI_VERSION,
|
||||
clientIdentifier: GROK_CLI_CLIENT_IDENTIFIER,
|
||||
tokenAuth: "xai-grok-cli",
|
||||
headers: {
|
||||
"User-Agent": GROK_CLI_USER_AGENT,
|
||||
"x-grok-client-identifier": GROK_CLI_CLIENT_IDENTIFIER,
|
||||
"x-grok-client-version": GROK_CLI_VERSION,
|
||||
},
|
||||
// Quota tracker: official CLI polls billing?format=credits + user?include=subscription
|
||||
usage: {
|
||||
url: `${GROK_CLI_BASE_URL}/billing?format=credits`,
|
||||
userUrl: `${GROK_CLI_BASE_URL}/user?include=subscription`,
|
||||
},
|
||||
retry: {
|
||||
429: { attempts: 2, delayMs: 2000 },
|
||||
502: { attempts: 2, delayMs: 1500 },
|
||||
503: { attempts: 2, delayMs: 1500 },
|
||||
},
|
||||
},
|
||||
models: [
|
||||
{
|
||||
id: GROK_CLI_MODEL,
|
||||
name: "Grok Build",
|
||||
contextLength: 500000,
|
||||
maxOutputTokens: 64000,
|
||||
},
|
||||
{ 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,97 @@ 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.js";
|
||||
import p54 from "./kiro.js";
|
||||
import p55 from "./linkup.js";
|
||||
import p56 from "./local-device.js";
|
||||
import p57 from "./mimo-free.js";
|
||||
import p58 from "./minimax-cn.js";
|
||||
import p59 from "./minimax.js";
|
||||
import p60 from "./mistral.js";
|
||||
import p61 from "./mmf.js";
|
||||
import p62 from "./nanobanana.js";
|
||||
import p63 from "./nebius.js";
|
||||
import p64 from "./nvidia.js";
|
||||
import p65 from "./ollama-local.js";
|
||||
import p66 from "./ollama.js";
|
||||
import p67 from "./openai.js";
|
||||
import p68 from "./opencode-go.js";
|
||||
import p69 from "./opencode.js";
|
||||
import p70 from "./openrouter.js";
|
||||
import p71 from "./perplexity-web.js";
|
||||
import p72 from "./perplexity.js";
|
||||
import p73 from "./perplexity-agent.js";
|
||||
import p74 from "./playht.js";
|
||||
import p75 from "./qoder.js";
|
||||
import p77 from "./recraft.js";
|
||||
import p78 from "./runwayml.js";
|
||||
import p79 from "./sdwebui.js";
|
||||
import p80 from "./searchapi.js";
|
||||
import p81 from "./searxng.js";
|
||||
import p82 from "./serper.js";
|
||||
import p83 from "./siliconflow.js";
|
||||
import p84 from "./stability-ai.js";
|
||||
import p85 from "./tavily.js";
|
||||
import p86 from "./together.js";
|
||||
import p87 from "./topaz.js";
|
||||
import p88 from "./tortoise.js";
|
||||
import p89 from "./venice.js";
|
||||
import p90 from "./vercel-ai-gateway.js";
|
||||
import p91 from "./vertex-partner.js";
|
||||
import p92 from "./vertex.js";
|
||||
import p93 from "./volcengine-ark.js";
|
||||
import p94 from "./voyage-ai.js";
|
||||
import p95 from "./xai.js";
|
||||
import p96 from "./xiaomi-mimo.js";
|
||||
import p97 from "./xiaomi-tokenplan.js";
|
||||
import p98 from "./youcom.js";
|
||||
import p99 from "./alims-intl.js";
|
||||
import p100 from "./codebuddy-intl.js";
|
||||
// Temporarily hidden — no tool calling support (trae SOLO agent / windsurf gRPC skip ToolCallChunk).
|
||||
// Re-enable by uncommenting both the import and the array entry below.
|
||||
// import p102 from "./trae.js";
|
||||
import p103 from "./zed.js";
|
||||
import p105 from "./api-airforce.js";
|
||||
import p106 from "./baidu.js";
|
||||
import p107 from "./bazaarlink.js";
|
||||
import p108 from "./bluesminds.js";
|
||||
import p109 from "./kilo-gateway.js";
|
||||
import p110 from "./llm7.js";
|
||||
import p111 from "./sambanova.js";
|
||||
import p112 from "./tencent.js";
|
||||
import p113 from "./morph.js";
|
||||
// import p114 from "./devin-cli.js";
|
||||
// import p104 from "./windsurf.js";
|
||||
import p115 from "./poolside.js";
|
||||
import p116 from "./tokenrouter.js";
|
||||
import p117 from "./selfhosted-stt.js";
|
||||
import p118 from "./selfhosted-tts.js";
|
||||
import p119 from "./selfhosted-embedding.js";
|
||||
import p120 from "./fish-audio.js";
|
||||
import p121 from "./alitp-intl.js";
|
||||
|
||||
export default [
|
||||
p0,
|
||||
@@ -174,7 +199,6 @@ export default [
|
||||
p73,
|
||||
p74,
|
||||
p75,
|
||||
p76,
|
||||
p77,
|
||||
p78,
|
||||
p79,
|
||||
@@ -194,5 +218,29 @@ export default [
|
||||
p93,
|
||||
p94,
|
||||
p95,
|
||||
p96
|
||||
p96,
|
||||
p97,
|
||||
p98,
|
||||
p99,
|
||||
p100,
|
||||
// p102, // trae — hidden, no tool calling
|
||||
p103,
|
||||
p105,
|
||||
p106,
|
||||
p107,
|
||||
p108,
|
||||
p109,
|
||||
p110,
|
||||
p111,
|
||||
p112,
|
||||
p113,
|
||||
// p114, // devin-cli — hidden, spawns local agent with shell/fs access
|
||||
// p104, // windsurf — hidden, no tool calling
|
||||
p115,
|
||||
p116,
|
||||
p117,
|
||||
p118,
|
||||
p119,
|
||||
p120,
|
||||
p121,
|
||||
];
|
||||
|
||||
34
open-sse/providers/registry/kilo-gateway.js
Normal file
34
open-sse/providers/registry/kilo-gateway.js
Normal file
@@ -0,0 +1,34 @@
|
||||
export default {
|
||||
id: "kilo-gateway",
|
||||
alias: "kgw",
|
||||
aliases: [
|
||||
"kilo-gateway",
|
||||
"kilogateway",
|
||||
],
|
||||
uiAlias: "kgw",
|
||||
category: "freeTier",
|
||||
display: {
|
||||
name: "Kilo Gateway",
|
||||
icon: "login",
|
||||
color: "#8B5CF6",
|
||||
textIcon: "KG",
|
||||
website: "https://kilo.ai",
|
||||
notice: {
|
||||
apiKeyUrl: "https://kilo.ai/dashboard?tab=apiKeys",
|
||||
},
|
||||
},
|
||||
authType: "apikey",
|
||||
authModes: ["apikey"],
|
||||
transport: {
|
||||
baseUrl: "https://api.kilo.ai/api/gateway/chat/completions",
|
||||
validateUrl: "https://api.kilo.ai/api/gateway/models",
|
||||
},
|
||||
models: [
|
||||
{ id: "kilo-auto/free", name: "Kilo Auto Free", contextLength: 256000 },
|
||||
{ id: "nvidia/nemotron-3-super-120b-a12b:free", name: "Nemotron 3 Super 120B (Free)", contextLength: 262144 },
|
||||
{ id: "nvidia/nemotron-3-ultra-550b-a55b:free", name: "Nemotron 3 Ultra 550B (Free)", contextLength: 1000000 },
|
||||
{ id: "kwaipilot/kat-coder-pro-v2.5:free", name: "Kat Coder Pro v2.5 (Free)", contextLength: 256000 },
|
||||
{ id: "kilo-auto/frontier", name: "Kilo Auto Frontier", contextLength: 1000000 },
|
||||
{ id: "kilo-auto/balanced", name: "Kilo Auto Balanced", contextLength: 1000000 },
|
||||
],
|
||||
};
|
||||
@@ -13,8 +13,8 @@ export default {
|
||||
signupUrl: "https://app.kimchi.dev",
|
||||
},
|
||||
},
|
||||
category: "oauth",
|
||||
authModes: ["oauth"],
|
||||
category: "freeTier",
|
||||
authModes: ["oauth", "apikey"],
|
||||
hasOAuth: true,
|
||||
transport: {
|
||||
baseUrl: "https://llm.kimchi.dev/openai/v1/chat/completions",
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
import { CLAUDE_API_HEADERS, KIMI_CODING_BASE_URL } from "../shared.js";
|
||||
|
||||
export default {
|
||||
id: "kimi-coding",
|
||||
hidden: true,
|
||||
priority: 120,
|
||||
alias: "kmc",
|
||||
display: {
|
||||
name: "Kimi Coding",
|
||||
icon: "psychology",
|
||||
color: "#1E40AF",
|
||||
textIcon: "KC",
|
||||
website: "https://kimi.moonshot.cn",
|
||||
notice: {
|
||||
signupUrl: "https://kimi.moonshot.cn",
|
||||
},
|
||||
},
|
||||
category: "oauth",
|
||||
transport: {
|
||||
baseUrl: "https://api.kimi.com/coding/v1/messages",
|
||||
format: "claude",
|
||||
urlSuffix: "?beta=true",
|
||||
headers: { ...CLAUDE_API_HEADERS },
|
||||
clientId: "17e5f671-d194-4dfb-9706-5516cb48c098",
|
||||
tokenUrl: "https://auth.kimi.com/api/oauth/token",
|
||||
refreshUrl: "https://auth.kimi.com/api/oauth/token",
|
||||
auth: {
|
||||
combined: true,
|
||||
header: "x-api-key",
|
||||
scheme: "raw",
|
||||
hooks: [
|
||||
"kimiHeaders",
|
||||
],
|
||||
},
|
||||
},
|
||||
// Multi-endpoint: pick the transport matching client sourceFormat to skip translation.
|
||||
transports: [
|
||||
{
|
||||
format: "openai",
|
||||
baseUrl: "https://api.kimi.com/coding/v1/chat/completions",
|
||||
auth: { combined: true, header: "Authorization", scheme: "bearer", hooks: ["kimiHeaders"] },
|
||||
},
|
||||
{
|
||||
format: "claude",
|
||||
baseUrl: "https://api.kimi.com/coding/v1/messages",
|
||||
urlSuffix: "?beta=true",
|
||||
headers: { ...CLAUDE_API_HEADERS },
|
||||
auth: { combined: true, header: "x-api-key", scheme: "raw", hooks: ["kimiHeaders"] },
|
||||
},
|
||||
],
|
||||
models: [
|
||||
{ id: "kimi-k2.6", name: "Kimi K2.6" },
|
||||
{ id: "kimi-k2.5", name: "Kimi K2.5" },
|
||||
{ id: "kimi-k2.5-thinking", name: "Kimi K2.5 Thinking" },
|
||||
{ id: "kimi-latest", name: "Kimi Latest" },
|
||||
],
|
||||
oauth: {
|
||||
deviceCodeUrl: "https://auth.kimi.com/api/oauth/device_authorization",
|
||||
tokenUrl: "https://auth.kimi.com/api/oauth/token",
|
||||
refreshLeadMs: 300000,
|
||||
},
|
||||
features: {
|
||||
usage: true,
|
||||
},
|
||||
};
|
||||
@@ -1,9 +1,14 @@
|
||||
import { CLAUDE_API_HEADERS, KIMI_CODING_BASE_URL } from "../shared.js";
|
||||
import { CLAUDE_API_HEADERS } from "../shared.js";
|
||||
|
||||
// Dual auth (same pattern as xai): OAuth = Kimi Code subscription (device code),
|
||||
// API key = platform.moonshot / api.kimi.com. Transport is shared.
|
||||
// CLIProxyAPI parity: client_id, auth.kimi.com device+token, X-Msh-* headers, device_id.
|
||||
export default {
|
||||
id: "kimi",
|
||||
priority: 170,
|
||||
alias: "kimi",
|
||||
// Legacy id + short alias from former kimi-coding registry entry
|
||||
aliases: ["kimi-coding", "kmc"],
|
||||
display: {
|
||||
name: "Kimi",
|
||||
icon: "psychology",
|
||||
@@ -12,18 +17,25 @@ export default {
|
||||
website: "https://kimi.moonshot.cn",
|
||||
notice: {
|
||||
apiKeyUrl: "https://platform.moonshot.ai/console/api-keys",
|
||||
signupUrl: "https://www.kimi.com/code",
|
||||
},
|
||||
},
|
||||
category: "apikey",
|
||||
category: "oauth",
|
||||
authModes: ["oauth", "apikey"],
|
||||
hasOAuth: true,
|
||||
transport: {
|
||||
baseUrl: "https://api.kimi.com/coding/v1/messages",
|
||||
format: "claude",
|
||||
urlSuffix: "?beta=true",
|
||||
headers: { ...CLAUDE_API_HEADERS },
|
||||
clientId: "17e5f671-d194-4dfb-9706-5516cb48c098",
|
||||
tokenUrl: "https://auth.kimi.com/api/oauth/token",
|
||||
refreshUrl: "https://auth.kimi.com/api/oauth/token",
|
||||
auth: {
|
||||
combined: true,
|
||||
header: "x-api-key",
|
||||
scheme: "raw",
|
||||
hooks: ["kimiHeaders"],
|
||||
},
|
||||
},
|
||||
// Multi-endpoint: pick the transport matching client sourceFormat to skip translation.
|
||||
@@ -31,26 +43,50 @@ export default {
|
||||
{
|
||||
format: "openai",
|
||||
baseUrl: "https://api.kimi.com/coding/v1/chat/completions",
|
||||
auth: { combined: true, header: "Authorization", scheme: "bearer" },
|
||||
auth: { combined: true, header: "Authorization", scheme: "bearer", hooks: ["kimiHeaders"] },
|
||||
},
|
||||
{
|
||||
format: "claude",
|
||||
baseUrl: "https://api.kimi.com/coding/v1/messages",
|
||||
urlSuffix: "?beta=true",
|
||||
headers: { ...CLAUDE_API_HEADERS },
|
||||
auth: { combined: true, header: "x-api-key", scheme: "raw" },
|
||||
auth: { combined: true, header: "x-api-key", scheme: "raw", hooks: ["kimiHeaders"] },
|
||||
},
|
||||
],
|
||||
models: [
|
||||
// Flagship K3 — platform.kimi.ai id `kimi-k3`, Kimi Code OAuth id `k3` (up to 1M)
|
||||
{ id: "kimi-k3", name: "Kimi K3" },
|
||||
{ id: "k3", name: "Kimi K3 (Code)" },
|
||||
// Kimi Code subscription stable ids (map to K2.7 Code backend)
|
||||
{ id: "kimi-for-coding", name: "Kimi for Coding" },
|
||||
{ id: "kimi-for-coding-highspeed", name: "Kimi for Coding Highspeed" },
|
||||
// Pay-as-you-go platform ids
|
||||
{ id: "kimi-k2.7-code", name: "Kimi K2.7 Code" },
|
||||
{ id: "kimi-k2.7-code-highspeed", name: "Kimi K2.7 Code Highspeed" },
|
||||
{ id: "kimi-k2.6", name: "Kimi K2.6" },
|
||||
{ id: "kimi-k2.5", name: "Kimi K2.5" },
|
||||
{ id: "kimi-k2.5-thinking", name: "Kimi K2.5 Thinking" },
|
||||
{ id: "kimi-latest", name: "Kimi Latest" },
|
||||
],
|
||||
serviceKinds: ["llm","webSearch"],
|
||||
serviceKinds: ["llm", "webSearch"],
|
||||
searchViaChat: {
|
||||
defaultModel: "kimi-k2.5",
|
||||
defaultModel: "kimi-k3",
|
||||
endpoint: "https://api.moonshot.cn/v1/chat/completions",
|
||||
pricingUrl: "https://platform.moonshot.ai/docs/pricing/chat",
|
||||
pricingUrl: "https://platform.kimi.ai/docs/pricing/chat",
|
||||
},
|
||||
oauth: {
|
||||
clientId: "17e5f671-d194-4dfb-9706-5516cb48c098",
|
||||
deviceCodeUrl: "https://auth.kimi.com/api/oauth/device_authorization",
|
||||
tokenUrl: "https://auth.kimi.com/api/oauth/token",
|
||||
refreshUrl: "https://auth.kimi.com/api/oauth/token",
|
||||
// CLIProxyAPI refreshThresholdSeconds = 300
|
||||
refreshLeadMs: 300000,
|
||||
authorizeDeviceUrl: "https://www.kimi.com/code/authorize_device",
|
||||
},
|
||||
features: {
|
||||
usage: true,
|
||||
// API-key connections also hit /v1/usages (x-api-key) — need usageApikey
|
||||
// so isUsageEligible + /api/usage allow non-oauth authType.
|
||||
usageApikey: true,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -29,7 +29,6 @@ export default {
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Accept: "application/vnd.amazon.eventstream",
|
||||
"X-Amz-Target": "AmazonCodeWhispererStreamingService.GenerateAssistantResponse",
|
||||
"User-Agent": "AWS-SDK-JS/3.0.0 kiro-ide/1.0.0",
|
||||
"X-Amz-User-Agent": "aws-sdk-js/3.0.0 kiro-ide/1.0.0",
|
||||
},
|
||||
@@ -42,22 +41,57 @@ export default {
|
||||
},
|
||||
},
|
||||
models: [
|
||||
// Opus (added per kiro.dev/changelog/models and kiro.dev/docs/models)
|
||||
{ id: "claude-opus-5", name: "Claude Opus 5" },
|
||||
{ id: "claude-opus-5-thinking", name: "Claude Opus 5 (Thinking)" },
|
||||
{ id: "claude-opus-5-agentic", name: "Claude Opus 5 (Agentic)" },
|
||||
{ id: "claude-opus-5-thinking-agentic", name: "Claude Opus 5 (Thinking + Agentic)" },
|
||||
{ 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" },
|
||||
{ id: "gpt-5.6-sol", name: "GPT 5.6 Sol", contextLength: 272000, rateMultiplier: 2.4, upstreamModelId: "gpt-5.6-sol", description: "Experimental preview of OpenAI GPT 5.6 Sol with 272k context window" },
|
||||
{ id: "gpt-5.6-terra", name: "GPT 5.6 Terra", contextLength: 272000, rateMultiplier: 1.2, upstreamModelId: "gpt-5.6-terra", description: "Experimental preview of OpenAI GPT 5.6 Terra with 272k context window" },
|
||||
{ id: "gpt-5.6-luna", name: "GPT 5.6 Luna", contextLength: 272000, rateMultiplier: 0.6, upstreamModelId: "gpt-5.6-luna", description: "Experimental preview of OpenAI GPT 5.6 Luna with 272k context window" },
|
||||
// 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)" },
|
||||
{ id: "gpt-5.6-sol-thinking", name: "GPT 5.6 Sol (Thinking)", contextLength: 272000, rateMultiplier: 2.4, upstreamModelId: "gpt-5.6-sol", description: "Experimental preview of OpenAI GPT 5.6 Sol with 272k context window" },
|
||||
{ id: "gpt-5.6-terra-thinking", name: "GPT 5.6 Terra (Thinking)", contextLength: 272000, rateMultiplier: 1.2, upstreamModelId: "gpt-5.6-terra", description: "Experimental preview of OpenAI GPT 5.6 Terra with 272k context window" },
|
||||
{ id: "gpt-5.6-luna-thinking", name: "GPT 5.6 Luna (Thinking)", contextLength: 272000, rateMultiplier: 0.6, upstreamModelId: "gpt-5.6-luna", description: "Experimental preview of OpenAI GPT 5.6 Luna with 272k context window" },
|
||||
// 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)" },
|
||||
{ id: "gpt-5.6-sol-agentic", name: "GPT 5.6 Sol (Agentic)", contextLength: 272000, rateMultiplier: 2.4, upstreamModelId: "gpt-5.6-sol", description: "Experimental preview of OpenAI GPT 5.6 Sol with 272k context window" },
|
||||
{ id: "gpt-5.6-terra-agentic", name: "GPT 5.6 Terra (Agentic)", contextLength: 272000, rateMultiplier: 1.2, upstreamModelId: "gpt-5.6-terra", description: "Experimental preview of OpenAI GPT 5.6 Terra with 272k context window" },
|
||||
{ id: "gpt-5.6-luna-agentic", name: "GPT 5.6 Luna (Agentic)", contextLength: 272000, rateMultiplier: 0.6, upstreamModelId: "gpt-5.6-luna", description: "Experimental preview of OpenAI GPT 5.6 Luna with 272k context window" },
|
||||
// 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)" },
|
||||
{ id: "gpt-5.6-sol-thinking-agentic", name: "GPT 5.6 Sol (Thinking + Agentic)", contextLength: 272000, rateMultiplier: 2.4, upstreamModelId: "gpt-5.6-sol", description: "Experimental preview of OpenAI GPT 5.6 Sol with 272k context window" },
|
||||
{ id: "gpt-5.6-terra-thinking-agentic", name: "GPT 5.6 Terra (Thinking + Agentic)", contextLength: 272000, rateMultiplier: 1.2, upstreamModelId: "gpt-5.6-terra", description: "Experimental preview of OpenAI GPT 5.6 Terra with 272k context window" },
|
||||
{ id: "gpt-5.6-luna-thinking-agentic", name: "GPT 5.6 Luna (Thinking + Agentic)", contextLength: 272000, rateMultiplier: 0.6, upstreamModelId: "gpt-5.6-luna", description: "Experimental preview of OpenAI GPT 5.6 Luna with 272k context window" },
|
||||
],
|
||||
oauth: {
|
||||
ssoOidcEndpoint: "https://oidc.us-east-1.amazonaws.com",
|
||||
|
||||
35
open-sse/providers/registry/llm7.js
Normal file
35
open-sse/providers/registry/llm7.js
Normal file
@@ -0,0 +1,35 @@
|
||||
export default {
|
||||
id: "llm7",
|
||||
alias: "llm7",
|
||||
aliases: [
|
||||
"llm-7",
|
||||
],
|
||||
uiAlias: "llm7",
|
||||
display: {
|
||||
name: "LLM7",
|
||||
icon: "pool",
|
||||
color: "#7C3AED",
|
||||
textIcon: "L7",
|
||||
website: "https://llm7.io",
|
||||
notice: {
|
||||
apiKeyUrl: "https://llm7.io",
|
||||
},
|
||||
},
|
||||
category: "apikey",
|
||||
authType: "apikey",
|
||||
authModes: [
|
||||
"apikey",
|
||||
],
|
||||
transport: {
|
||||
baseUrl: "https://api.llm7.io/v1/chat/completions",
|
||||
validateUrl: "https://api.llm7.io/v1/models",
|
||||
},
|
||||
models: [
|
||||
{ id: "gpt-5.5", name: "GPT-5.5 (LLM7)", contextLength: 1050000 },
|
||||
{ id: "claude-opus-5", name: "Claude Opus 5 (LLM7)", contextLength: 1000000 },
|
||||
{ id: "deepseek-v4-flash", name: "DeepSeek V4 Flash (LLM7)", contextLength: 1000000 },
|
||||
{ id: "grok-4.5", name: "Grok 4.5 (LLM7)", contextLength: 500000 },
|
||||
{ id: "kimi-k3", name: "Kimi K3 (LLM7)", contextLength: 1000000 },
|
||||
],
|
||||
passthroughModels: true,
|
||||
};
|
||||
@@ -1,5 +1,8 @@
|
||||
// Xiaomi ended the free MiMo channel ("MiMo free API service has ended").
|
||||
// Hidden until/unless a replacement (OAuth MiMo Platform) is wired.
|
||||
export default {
|
||||
id: "mimo-free",
|
||||
hidden: true,
|
||||
priority: 50,
|
||||
hasFree: true,
|
||||
alias: "mmf",
|
||||
|
||||
29
open-sse/providers/registry/morph.js
Normal file
29
open-sse/providers/registry/morph.js
Normal file
@@ -0,0 +1,29 @@
|
||||
export default {
|
||||
id: "morph",
|
||||
alias: "morph",
|
||||
aliases: ["morphllm"],
|
||||
uiAlias: "morph",
|
||||
display: {
|
||||
name: "Morph",
|
||||
icon: "change_history",
|
||||
color: "#14B8A6",
|
||||
textIcon: "MP",
|
||||
website: "https://morphllm.com",
|
||||
notice: { apiKeyUrl: "https://morphllm.com" },
|
||||
},
|
||||
category: "apikey",
|
||||
authType: "apikey",
|
||||
authModes: ["apikey"],
|
||||
transport: {
|
||||
baseUrl: "https://api.morphllm.com/v1/chat/completions",
|
||||
validateUrl: "https://api.morphllm.com/v1/models",
|
||||
},
|
||||
models: [
|
||||
{ id: "morph-v3-large", name: "Morph v3 Large" },
|
||||
{ id: "morph-v3-fast", name: "Morph v3 Fast" },
|
||||
{ id: "morph-qwen35-397b", name: "Qwen 3.5 397B (Morph)", contextLength: 262144 },
|
||||
{ id: "morph-minimax27-230b", name: "MiniMax M2.7 (Morph)", contextLength: 200704 },
|
||||
{ id: "morph-qwen36-27b", name: "Qwen 3.6 27B (Morph)", contextLength: 262144 },
|
||||
{ id: "morph-dsv4flash", name: "DeepSeek V4 Flash (Morph)", contextLength: 1048576 },
|
||||
],
|
||||
};
|
||||
@@ -15,6 +15,8 @@ export default {
|
||||
},
|
||||
},
|
||||
category: "freeTier",
|
||||
authType: "apikey",
|
||||
authModes: ["apikey"],
|
||||
transport: {
|
||||
baseUrl: "https://integrate.api.nvidia.com/v1/chat/completions",
|
||||
validateUrl: "https://integrate.api.nvidia.com/v1/models",
|
||||
|
||||
@@ -15,6 +15,8 @@ export default {
|
||||
},
|
||||
},
|
||||
category: "freeTier",
|
||||
authType: "apikey",
|
||||
authModes: ["apikey"],
|
||||
transport: {
|
||||
baseUrl: "https://ollama.com/api/chat",
|
||||
validateUrl: "https://ollama.com/api/tags",
|
||||
@@ -32,5 +34,6 @@ export default {
|
||||
serviceKinds: ["llm"],
|
||||
features: {
|
||||
usage: true,
|
||||
usageApikey: true,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -22,20 +22,28 @@ export default {
|
||||
baseUrl: "https://opencode.ai/zen/go/v1/chat/completions",
|
||||
headers: {},
|
||||
},
|
||||
// Multi-endpoint: pick the transport matching the client sourceFormat to skip
|
||||
// translation. Guarded per-model by `supportedFormats` (see chatCore) because
|
||||
// opencode-go models differ in endpoint support.
|
||||
transports: [
|
||||
{ format: "openai", baseUrl: "https://opencode.ai/zen/go/v1/chat/completions", auth: { combined: true, header: "Authorization", scheme: "bearer" } },
|
||||
{ format: "claude", baseUrl: "https://opencode.ai/zen/go/v1/messages", auth: { combined: true, header: "x-api-key", scheme: "raw", anthropicVersion: true } },
|
||||
{ format: "openai-responses", baseUrl: "https://opencode.ai/zen/go/v1/responses", auth: { combined: true, header: "Authorization", scheme: "bearer" } },
|
||||
],
|
||||
models: [
|
||||
{ id: "glm-5.2", name: "GLM 5.2" },
|
||||
{ id: "glm-5.1", name: "GLM 5.1" },
|
||||
{ id: "kimi-k2.7-code", name: "Kimi K2.7 Code" },
|
||||
{ id: "kimi-k2.6", name: "Kimi K2.6" },
|
||||
{ id: "deepseek-v4-pro", name: "DeepSeek V4 Pro" },
|
||||
{ id: "deepseek-v4-flash", name: "DeepSeek V4 Flash" },
|
||||
{ id: "mimo-v2.5", name: "MiMo V2.5" },
|
||||
{ id: "mimo-v2.5-pro", name: "MiMo V2.5 Pro" },
|
||||
{ id: "minimax-m3", name: "MiniMax M3", targetFormat: "claude" },
|
||||
{ id: "minimax-m2.7", name: "MiniMax M2.7", targetFormat: "claude" },
|
||||
{ id: "minimax-m2.5", name: "MiniMax M2.5", targetFormat: "claude" },
|
||||
{ id: "qwen3.7-max", name: "Qwen 3.7 Max", targetFormat: "claude" },
|
||||
{ id: "qwen3.7-plus", name: "Qwen 3.7 Plus", targetFormat: "claude" },
|
||||
{ id: "qwen3.6-plus", name: "Qwen 3.6 Plus", targetFormat: "claude" },
|
||||
{ id: "glm-5.2", name: "GLM 5.2", supportedFormats: ["openai"] },
|
||||
{ id: "glm-5.1", name: "GLM 5.1", supportedFormats: ["openai"] },
|
||||
{ id: "kimi-k2.7-code", name: "Kimi K2.7 Code", supportedFormats: ["openai"] },
|
||||
{ id: "kimi-k2.6", name: "Kimi K2.6", supportedFormats: ["openai"] },
|
||||
{ id: "deepseek-v4-pro", name: "DeepSeek V4 Pro", supportedFormats: ["openai", "claude", "openai-responses"] },
|
||||
{ id: "deepseek-v4-flash", name: "DeepSeek V4 Flash", supportedFormats: ["openai", "claude", "openai-responses"] },
|
||||
{ id: "mimo-v2.5", name: "MiMo V2.5", supportedFormats: ["openai"] },
|
||||
{ id: "mimo-v2.5-pro", name: "MiMo V2.5 Pro", supportedFormats: ["openai"] },
|
||||
{ id: "minimax-m3", name: "MiniMax M3", supportedFormats: ["openai", "claude"] },
|
||||
{ id: "minimax-m2.7", name: "MiniMax M2.7", supportedFormats: ["openai", "claude"] },
|
||||
{ id: "minimax-m2.5", name: "MiniMax M2.5", supportedFormats: ["openai", "claude"] },
|
||||
{ id: "qwen3.7-max", name: "Qwen 3.7 Max", supportedFormats: ["openai", "claude"] },
|
||||
{ id: "qwen3.7-plus", name: "Qwen 3.7 Plus", supportedFormats: ["openai", "claude"] },
|
||||
{ id: "qwen3.6-plus", name: "Qwen 3.6 Plus", supportedFormats: ["openai", "claude"] },
|
||||
],
|
||||
};
|
||||
|
||||
@@ -15,6 +15,8 @@ export default {
|
||||
},
|
||||
},
|
||||
category: "freeTier",
|
||||
authType: "apikey",
|
||||
authModes: ["apikey"],
|
||||
transport: {
|
||||
baseUrl: "https://openrouter.ai/api/v1/chat/completions",
|
||||
thinkingFormat: "openai",
|
||||
|
||||
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,
|
||||
};
|
||||
30
open-sse/providers/registry/poolside.js
Normal file
30
open-sse/providers/registry/poolside.js
Normal file
@@ -0,0 +1,30 @@
|
||||
export default {
|
||||
id: "poolside",
|
||||
priority: 60,
|
||||
alias: "poolside",
|
||||
aliases: [
|
||||
"ps",
|
||||
],
|
||||
uiAlias: "ps",
|
||||
display: {
|
||||
name: "Poolside",
|
||||
icon: "water_drop",
|
||||
color: "#0EA5E9",
|
||||
textIcon: "PS",
|
||||
website: "https://poolside.ai",
|
||||
notice: {
|
||||
apiKeyUrl: "https://platform.poolside.ai/api-keys",
|
||||
},
|
||||
},
|
||||
category: "freeTier",
|
||||
authType: "apikey",
|
||||
authModes: ["apikey"],
|
||||
transport: {
|
||||
baseUrl: "https://inference.poolside.ai/v1/chat/completions",
|
||||
validateUrl: "https://inference.poolside.ai/v1/models",
|
||||
},
|
||||
models: [
|
||||
{ id: "poolside/laguna-s-2.1", name: "Laguna S 2.1" },
|
||||
{ id: "poolside/laguna-xs-2.1", name: "Laguna XS 2.1" },
|
||||
],
|
||||
};
|
||||
@@ -11,10 +11,11 @@ export default {
|
||||
notice: {
|
||||
signupUrl: "https://qoder.com",
|
||||
},
|
||||
deprecated: true,
|
||||
deprecationNotice: "RISK_NOTICE",
|
||||
},
|
||||
category: "free",
|
||||
category: "oauth",
|
||||
authModes: ["oauth", "apikey"],
|
||||
hasOAuth: true,
|
||||
authHint: "Personal Access Token (pt-...) từ https://qoder.com/account/integrations",
|
||||
transport: {
|
||||
baseUrl: "https://api3.qoder.sh/algo/api/v2/service/pro/sse/agent_chat_generation",
|
||||
headers: {},
|
||||
@@ -25,18 +26,19 @@ export default {
|
||||
},
|
||||
},
|
||||
models: [
|
||||
// { id: "auto", name: "Qoder Auto" },
|
||||
// { id: "ultimate", name: "Qoder Ultimate" },
|
||||
// { id: "performance", name: "Qoder Performance" },
|
||||
// { id: "efficient", name: "Qoder Efficient" },
|
||||
// { id: "lite", name: "Qoder Lite" },
|
||||
// { id: "qmodel", name: "Qwen 3.6 Plus (Qoder)" },
|
||||
{ id: "qmodel_latest", name: "Qoder Qwen 3.7 Max" },
|
||||
// { id: "dmodel", name: "DeepSeek V4 Pro (Qoder)" },
|
||||
// { id: "dfmodel", name: "DeepSeek V4 Flash (Qoder)" },
|
||||
// { id: "gm51model", name: "GLM 5.1 (Qoder)" },
|
||||
// { id: "kmodel", name: "Kimi K2.6 (Qoder)" },
|
||||
// { id: "mmodel", name: "MiniMax M2.7 (Qoder)" },
|
||||
{ id: "ultimate", name: "Ultimate" },
|
||||
{ id: "auto", name: "Auto" },
|
||||
{ id: "performance", name: "Performance" },
|
||||
{ id: "efficient", name: "Efficient" },
|
||||
{ id: "qmodel_preview", name: "Qwen3.8-Max-Preview" },
|
||||
{ id: "qmodel_latest", name: "Qwen3.7-Max" },
|
||||
{ id: "qmodel", name: "Qwen3.7-Plus" },
|
||||
{ id: "kmodel_latest", name: "Kimi-K3" },
|
||||
{ id: "kmodel", name: "Kimi-K2.7-Code" },
|
||||
{ id: "gm51model", name: "GLM-5.2" },
|
||||
{ id: "dmodel", name: "DeepSeek-V4-Pro" },
|
||||
{ id: "dfmodel", name: "DeepSeek-V4-Flash" },
|
||||
{ id: "mmodel", name: "MiniMax-M3" },
|
||||
],
|
||||
oauth: {
|
||||
openApiBaseUrl: "https://openapi.qoder.sh",
|
||||
@@ -50,5 +52,7 @@ export default {
|
||||
},
|
||||
features: {
|
||||
usage: true,
|
||||
// PAT (apikey) connections also carry quota usage (via job-token exchange).
|
||||
usageApikey: true,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
export default {
|
||||
id: "qwen",
|
||||
hidden: true,
|
||||
priority: 130,
|
||||
alias: "qw",
|
||||
display: {
|
||||
name: "Qwen Code",
|
||||
icon: "psychology",
|
||||
color: "#10B981",
|
||||
website: "https://chat.qwen.ai",
|
||||
notice: {
|
||||
signupUrl: "https://chat.qwen.ai",
|
||||
},
|
||||
},
|
||||
category: "oauth",
|
||||
transport: {
|
||||
baseUrl: "https://portal.qwen.ai/v1/chat/completions",
|
||||
},
|
||||
models: [
|
||||
{ id: "qwen3-coder-plus", name: "Qwen3 Coder Plus" },
|
||||
{ id: "qwen3-coder-flash", name: "Qwen3 Coder Flash" },
|
||||
{ id: "vision-model", name: "Qwen3 Vision Model" },
|
||||
{ id: "coder-model", name: "Qwen3.6 Coder Model" },
|
||||
],
|
||||
oauth: {
|
||||
clientId: "f0304373b74a44d2b584a3fb70ca9e56",
|
||||
deviceCodeUrl: "https://chat.qwen.ai/api/v1/oauth2/device/code",
|
||||
tokenUrl: "https://chat.qwen.ai/api/v1/oauth2/token",
|
||||
scope: "openid profile email model.completion",
|
||||
codeChallengeMethod: "S256",
|
||||
refreshLeadMs: 1200000,
|
||||
},
|
||||
};
|
||||
27
open-sse/providers/registry/sambanova.js
Normal file
27
open-sse/providers/registry/sambanova.js
Normal file
@@ -0,0 +1,27 @@
|
||||
export default {
|
||||
id: "sambanova",
|
||||
alias: "samba",
|
||||
aliases: ["sambanova-ai"],
|
||||
uiAlias: "samba",
|
||||
hidden: true,
|
||||
display: {
|
||||
name: "SambaNova",
|
||||
icon: "memory",
|
||||
color: "#F97316",
|
||||
textIcon: "SN",
|
||||
website: "https://sambanova.ai",
|
||||
notice: {
|
||||
apiKeyUrl: "https://cloud.sambanova.ai/apis",
|
||||
},
|
||||
},
|
||||
category: "apikey",
|
||||
authType: "apikey",
|
||||
authModes: ["apikey"],
|
||||
transport: {
|
||||
baseUrl: "https://api.sambanova.ai/v1/chat/completions",
|
||||
validateUrl: "https://api.sambanova.ai/v1/models",
|
||||
},
|
||||
models: [
|
||||
{ id: "MiniMax-M2.7", name: "MiniMax M2.7", contextLength: 196608 },
|
||||
],
|
||||
};
|
||||
@@ -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",
|
||||
|
||||
73
open-sse/providers/registry/selfhosted-embedding.js
Normal file
73
open-sse/providers/registry/selfhosted-embedding.js
Normal file
@@ -0,0 +1,73 @@
|
||||
// Self-hosted, OpenAI-compatible embeddings (llama.cpp / llama-server, vLLM,
|
||||
// Infinity, text-embeddings-inference, ...) — the embeddings counterpart of
|
||||
// selfhosted-stt and selfhosted-tts.
|
||||
//
|
||||
// Routing a self-hosted embeddings server already WORKS today, via a custom
|
||||
// provider node: getEmbeddingAdapter() matches `openai-compatible-*` and
|
||||
// `custom-embedding-*` and returns openaiCompatNode, whose buildUrl reads
|
||||
// creds.providerSpecificData.baseUrl. What is missing is a first-class provider,
|
||||
// and the gap is visible rather than functional:
|
||||
//
|
||||
// /v1/embeddings on such a node -> 200, correct vectors
|
||||
// the Embedding page in the dashboard -> the node is not listed at all
|
||||
//
|
||||
// The page renders getProvidersByKind("embedding") plus provider nodes filtered
|
||||
// to `type === "custom-embedding"`. A node created as `openai-compatible` — the
|
||||
// natural choice when ONE endpoint serves chat and embeddings behind the same
|
||||
// front door — satisfies neither, so a working self-hosted embeddings endpoint is
|
||||
// invisible on the page whose job is to show embeddings providers. Diagnosed on a
|
||||
// deployment serving Qwen3-Embedding-8B at 4096 dimensions through exactly that
|
||||
// shape (2026-08-04).
|
||||
//
|
||||
// Declaring it as a provider with serviceKinds: ["embedding"] puts it on the page
|
||||
// beside Voyage, Jina and the rest, and keeps the per-connection baseUrl that
|
||||
// makes self-hosting possible at all.
|
||||
//
|
||||
// authType is "apikey" rather than "none" for the same reason as the STT and TTS
|
||||
// entries: it is what gives the connection a credentials record, and
|
||||
// providerSpecificData.baseUrl lives there. Local servers ignore the key itself;
|
||||
// any non-empty value works.
|
||||
export default {
|
||||
id: "selfhosted-embedding",
|
||||
priority: 50,
|
||||
hasFree: true,
|
||||
alias: "selfhosted-embedding",
|
||||
display: {
|
||||
name: "Self-hosted Embedding",
|
||||
icon: "cloud",
|
||||
color: "#ffffffff",
|
||||
textIcon: "SE",
|
||||
website: "https://github.com/ggml-org/llama.cpp",
|
||||
},
|
||||
category: "apikey",
|
||||
auth: {
|
||||
apiKey: {
|
||||
// Note the /v1: the adapter appends "/embeddings" to whatever it is given,
|
||||
// so a bare http://host:8080 resolves to http://host:8080/embeddings and
|
||||
// misses the OpenAI route entirely. Give it the OpenAI base, the same value
|
||||
// an OpenAI client would use. A trailing /embeddings is tolerated.
|
||||
text: "Set providerSpecificData.baseUrl to the OpenAI base URL, e.g. http://host:8080/v1 — /embeddings is appended. The API key is not checked by local servers; any value works.",
|
||||
},
|
||||
},
|
||||
// A self-hosted server serves whatever model it was started with, so the id
|
||||
// here is a placeholder for the UI: the request passes `model` straight
|
||||
// through, and llama-server ignores an unknown value rather than rejecting it.
|
||||
// Dimensions are deliberately NOT declared — they are a property of the loaded
|
||||
// weights, and asserting a number here would be a guess that silently
|
||||
// contradicts the server.
|
||||
models: [
|
||||
{ id: "embedding", name: "Self-hosted embedding model", kind: "embedding" },
|
||||
],
|
||||
serviceKinds: ["embedding"],
|
||||
embeddingConfig: {
|
||||
// Declared for shape-consistency with the other embedding providers, and
|
||||
// read by the UI — but NOT by the request path. openaiCompatNode resolves the
|
||||
// URL purely from creds.providerSpecificData.baseUrl (falling back to
|
||||
// api.openai.com), so unlike a fixed cloud provider this baseUrl never
|
||||
// reaches the wire. Stated plainly because a reader would otherwise
|
||||
// reasonably assume it is the default endpoint.
|
||||
baseUrl: "http://localhost:8080/v1/embeddings",
|
||||
authType: "apikey",
|
||||
authHeader: "bearer",
|
||||
},
|
||||
};
|
||||
48
open-sse/providers/registry/selfhosted-stt.js
Normal file
48
open-sse/providers/registry/selfhosted-stt.js
Normal file
@@ -0,0 +1,48 @@
|
||||
// Self-hosted, OpenAI-compatible speech-to-text (whisper.cpp, faster-whisper,
|
||||
// Speaches, vLLM-served Whisper, ...).
|
||||
//
|
||||
// Every other STT provider here is a named cloud service with a fixed endpoint.
|
||||
// This one exists so a locally-served /v1/audio/transcriptions can be used at
|
||||
// all: set the connection's providerSpecificData.baseUrl to the full URL of the
|
||||
// endpoint, exactly as the custom embedding providers already work.
|
||||
//
|
||||
// sttCore dispatches on `format`; anything that is not one of the five named
|
||||
// cloud shapes falls through to transcribeOpenAICompatible, which POSTs the
|
||||
// standard multipart body (file, model, and optional language / prompt /
|
||||
// response_format / temperature). That is precisely what whisper.cpp's OpenAI
|
||||
// endpoint accepts.
|
||||
//
|
||||
// authType is "apikey" rather than "none" so the connection carries a
|
||||
// credentials record — which is where providerSpecificData.baseUrl lives. Local
|
||||
// servers ignore the key itself; any non-empty value works.
|
||||
export default {
|
||||
id: "selfhosted-stt",
|
||||
priority: 50,
|
||||
hasFree: true,
|
||||
alias: "selfhosted-stt",
|
||||
display: {
|
||||
name: "Self-hosted STT",
|
||||
icon: "cloud",
|
||||
color: "#ffffffff",
|
||||
textIcon: "ST",
|
||||
website: "https://github.com/ggml-org/whisper.cpp",
|
||||
},
|
||||
category: "apikey",
|
||||
auth: {
|
||||
apiKey: {
|
||||
text: "Set providerSpecificData.baseUrl to the full transcriptions URL, e.g. http://host:8080/v1/audio/transcriptions. The API key is not checked by local servers; any value works.",
|
||||
},
|
||||
},
|
||||
models: [
|
||||
{ id: "whisper-1", name: "Whisper (self-hosted)", params: ["language", "response_format", "temperature", "prompt"], kind: "stt" },
|
||||
],
|
||||
serviceKinds: ["stt"],
|
||||
sttConfig: {
|
||||
// Overridden per connection by providerSpecificData.baseUrl; this default
|
||||
// only makes the provider usable out of the box on a same-host deployment.
|
||||
baseUrl: "http://localhost:8080/v1/audio/transcriptions",
|
||||
authType: "apikey",
|
||||
authHeader: "bearer",
|
||||
format: "openai",
|
||||
},
|
||||
};
|
||||
44
open-sse/providers/registry/selfhosted-tts.js
Normal file
44
open-sse/providers/registry/selfhosted-tts.js
Normal file
@@ -0,0 +1,44 @@
|
||||
// Self-hosted, OpenAI-compatible text-to-speech (Kokoro-FastAPI, openedai-speech,
|
||||
// vLLM-served TTS, ...) — the TTS counterpart of selfhosted-stt.
|
||||
//
|
||||
// Every other self-hostable TTS provider here (coqui, tortoise) carries a FIXED
|
||||
// localhost baseUrl in its registry entry and `authType: "none"`, and the generic
|
||||
// dispatcher reads `ttsConfig.baseUrl` from that entry rather than from the
|
||||
// connection. So there was no way to point TTS at a server on another host.
|
||||
//
|
||||
// `authType: "apikey"` is what makes the override possible at all: it gives the
|
||||
// connection a credentials record, which is where providerSpecificData.baseUrl
|
||||
// lives. Local servers ignore the key; any non-empty value works.
|
||||
export default {
|
||||
id: "selfhosted-tts",
|
||||
priority: 50,
|
||||
hasFree: true,
|
||||
alias: "selfhosted-tts",
|
||||
display: {
|
||||
name: "Self-hosted TTS",
|
||||
icon: "cloud",
|
||||
color: "#ffffffff",
|
||||
textIcon: "TT",
|
||||
website: "https://github.com/remsky/Kokoro-FastAPI",
|
||||
},
|
||||
category: "apikey",
|
||||
auth: {
|
||||
apiKey: {
|
||||
text: "Set providerSpecificData.baseUrl to the server root, e.g. http://host:8080 — /v1/audio/speech is appended. The API key is not checked by local servers; any value works.",
|
||||
},
|
||||
},
|
||||
// Voice is selected as "<model>/<voice>", the same convention the OpenAI TTS
|
||||
// adapter uses, so existing clients need no special casing.
|
||||
models: [
|
||||
{ id: "kokoro", name: "Kokoro (self-hosted)", params: ["voice", "response_format", "speed"], kind: "tts" },
|
||||
],
|
||||
serviceKinds: ["tts"],
|
||||
ttsConfig: {
|
||||
// Overridden per connection by providerSpecificData.baseUrl; this default
|
||||
// only makes the provider usable on a same-host deployment.
|
||||
baseUrl: "http://localhost:8880",
|
||||
defaultModel: "kokoro",
|
||||
authType: "apikey",
|
||||
format: "openai-speech",
|
||||
},
|
||||
};
|
||||
27
open-sse/providers/registry/tencent.js
Normal file
27
open-sse/providers/registry/tencent.js
Normal file
@@ -0,0 +1,27 @@
|
||||
export default {
|
||||
id: "tencent",
|
||||
alias: "hunyuan",
|
||||
aliases: ["hunyuan", "tencent-hunyuan"],
|
||||
uiAlias: "hunyuan",
|
||||
display: {
|
||||
name: "Tencent Hunyuan",
|
||||
icon: "cloud",
|
||||
color: "#0052D9",
|
||||
textIcon: "HY",
|
||||
website: "https://cloud.tencent.com/product/hunyuan",
|
||||
notice: {
|
||||
apiKeyUrl: "https://console.cloud.tencent.com/hunyuan/api-key",
|
||||
},
|
||||
},
|
||||
category: "apikey",
|
||||
authType: "apikey",
|
||||
authModes: ["apikey"],
|
||||
transport: {
|
||||
baseUrl: "https://api.hunyuan.cloud.tencent.com/v1/chat/completions",
|
||||
validateUrl: "https://api.hunyuan.cloud.tencent.com/v1/models",
|
||||
},
|
||||
models: [
|
||||
{ id: "hunyuan-turbos-latest", name: "Hunyuan TurboS Latest", contextLength: 200000 },
|
||||
{ id: "hunyuan-t1-latest", name: "Hunyuan T1 Latest", contextLength: 256000 },
|
||||
],
|
||||
};
|
||||
162
open-sse/providers/registry/tokenrouter.js
Normal file
162
open-sse/providers/registry/tokenrouter.js
Normal file
@@ -0,0 +1,162 @@
|
||||
export default {
|
||||
id: "tokenrouter",
|
||||
alias: "tokenrouter",
|
||||
aliases: ["tr"],
|
||||
uiAlias: "tokenrouter",
|
||||
display: {
|
||||
name: "TokenRouter",
|
||||
icon: "hub",
|
||||
color: "#0EA5E9",
|
||||
textIcon: "TR",
|
||||
website: "https://www.tokenrouter.com",
|
||||
notice: {
|
||||
text: "OpenAI-compatible gateway. 300+ models (OpenAI, Claude, Gemini, Qwen, DeepSeek, Kimi, GLM, dsb).",
|
||||
apiKeyUrl: "https://www.tokenrouter.com",
|
||||
},
|
||||
},
|
||||
category: "apikey",
|
||||
thinkingConfig: {
|
||||
options: ["low", "medium", "high", "xhigh", "max"],
|
||||
defaultMode: "high",
|
||||
},
|
||||
transport: {
|
||||
baseUrl: "https://api.tokenrouter.com/v1/chat/completions",
|
||||
validateUrl: "https://api.tokenrouter.com/v1/models",
|
||||
thinkingFormat: "tokenrouter",
|
||||
},
|
||||
// Seed snapshot from live /v1/models (120 entries). Latest catalogue is
|
||||
// fetched via modelsFetcher; other ids still accepted via passthroughModels.
|
||||
models: [
|
||||
{ id: "MiniMax-Hailuo-2.3", name: "Minimax Hailuo 2.3", kind: "video" },
|
||||
{ id: "MiniMax-M3", name: "Minimax M3" },
|
||||
{ id: "anthropic/claude-fable-5", name: "Claude Fable 5" },
|
||||
{ id: "anthropic/claude-haiku-4.5", name: "Claude Haiku 4.5" },
|
||||
{ id: "anthropic/claude-opus-4.5", name: "Claude Opus 4.5" },
|
||||
{ id: "anthropic/claude-opus-4.6", name: "Claude Opus 4.6" },
|
||||
{ id: "anthropic/claude-opus-4.7", name: "Claude Opus 4.7" },
|
||||
{ id: "anthropic/claude-opus-4.7-fast", name: "Claude Opus 4.7 Fast" },
|
||||
{ id: "anthropic/claude-opus-4.8", name: "Claude Opus 4.8" },
|
||||
{ id: "anthropic/claude-opus-4.8-fast", name: "Claude Opus 4.8 Fast" },
|
||||
{ id: "anthropic/claude-opus-5", name: "Claude Opus 5" },
|
||||
{ id: "anthropic/claude-opus-5-fast", name: "Claude Opus 5 Fast" },
|
||||
{ id: "anthropic/claude-sonnet-4", name: "Claude Sonnet 4" },
|
||||
{ id: "anthropic/claude-sonnet-4.5", name: "Claude Sonnet 4.5" },
|
||||
{ id: "anthropic/claude-sonnet-4.6", name: "Claude Sonnet 4.6" },
|
||||
{ id: "anthropic/claude-sonnet-5", name: "Claude Sonnet 5" },
|
||||
{ id: "bytedance-seed/seedream-4.5", name: "Seedream 4.5", kind: "image" },
|
||||
{ id: "bytedance-seed/seedream-5.0-lite", name: "Seedream 5.0 Lite", kind: "image" },
|
||||
{ id: "bytedance-seed/seedream-5.0-pro", name: "Seedream 5.0 Pro", kind: "image" },
|
||||
{ id: "claude-haiku-4-5", name: "Claude Haiku 4 5" },
|
||||
{ id: "claude-opus-4-8-m-aws", name: "Claude Opus 4 8 M Aws" },
|
||||
{ id: "deepseek/deepseek-v3.2", name: "Deepseek V3.2" },
|
||||
{ id: "deepseek/deepseek-v4-flash", name: "Deepseek V4 Flash" },
|
||||
{ id: "deepseek/deepseek-v4-flash-0731", name: "Deepseek V4 Flash 0731" },
|
||||
{ id: "deepseek/deepseek-v4-pro", name: "Deepseek V4 Pro" },
|
||||
{ id: "ex/gpt-5.4", name: "Gpt 5.4" },
|
||||
{ id: "google/gemini-2.5-flash-image", name: "Gemini 2.5 Flash Image" },
|
||||
{ id: "google/gemini-3-flash-preview", name: "Gemini 3 Flash Preview" },
|
||||
{ id: "google/gemini-3-pro-image-preview", name: "Gemini 3 Pro Image Preview" },
|
||||
{ id: "google/gemini-3.1-flash-image-preview", name: "Gemini 3.1 Flash Image Preview" },
|
||||
{ id: "google/gemini-3.1-flash-lite-image", name: "Gemini 3.1 Flash Lite Image" },
|
||||
{ id: "google/gemini-3.1-pro-preview", name: "Gemini 3.1 Pro Preview" },
|
||||
{ id: "google/gemini-3.5-flash", name: "Gemini 3.5 Flash" },
|
||||
{ id: "google/gemini-3.5-flash-lite", name: "Gemini 3.5 Flash Lite" },
|
||||
{ id: "google/gemini-3.6-flash", name: "Gemini 3.6 Flash" },
|
||||
{ id: "google/gemini-embedding-2", name: "Gemini Embedding 2" },
|
||||
{ id: "google/gemma-4-26b-a4b-it", name: "Gemma 4 26B A4B It" },
|
||||
{ id: "happyhorse-1.0-t2v", name: "Happyhorse 1.0 T2V", kind: "video" },
|
||||
{ id: "kling-3.0-turbo", name: "Kling 3.0 Turbo", kind: "video" },
|
||||
{ id: "kling-v2-6", name: "Kling V2 6", kind: "video" },
|
||||
{ id: "kling-v3", name: "Kling V3", kind: "video" },
|
||||
{ id: "kling-v3-omni", name: "Kling V3 Omni", kind: "video" },
|
||||
{ id: "microsoft/mai-image-2.5", name: "Mai Image 2.5" },
|
||||
{ id: "minimax/minimax-m2-her", name: "Minimax M2 Her" },
|
||||
{ id: "minimax/minimax-m2.1", name: "Minimax M2.1" },
|
||||
{ id: "minimax/minimax-m2.1-highspeed", name: "Minimax M2.1 Highspeed" },
|
||||
{ id: "minimax/minimax-m2.5", name: "Minimax M2.5" },
|
||||
{ id: "minimax/minimax-m2.7", name: "Minimax M2.7" },
|
||||
{ id: "minimax/minimax-m2.7-highspeed", name: "Minimax M2.7 Highspeed" },
|
||||
{ id: "miromind/mirothinker-1-7-deepresearch", name: "Mirothinker 1 7 Deepresearch" },
|
||||
{ id: "miromind/mirothinker-1-7-deepresearch-mini", name: "Mirothinker 1 7 Deepresearch Mini" },
|
||||
{ id: "mistralai/devstral-2512", name: "Devstral 2512" },
|
||||
{ id: "mistralai/mistral-medium-3-5", name: "Mistral Medium 3 5" },
|
||||
{ id: "mistralai/mistral-small-2603", name: "Mistral Small 2603" },
|
||||
{ id: "mistralai/voxtral-small-24b-2507", name: "Voxtral Small 24B 2507" },
|
||||
{ id: "moonshotai/kimi-k2.5", name: "Kimi K2.5" },
|
||||
{ id: "moonshotai/kimi-k2.6", name: "Kimi K2.6" },
|
||||
{ id: "moonshotai/kimi-k2.7-code", name: "Kimi K2.7 Code" },
|
||||
{ id: "moonshotai/kimi-k3", name: "Kimi K3" },
|
||||
{ id: "moonshotai/kimi-k3-free", name: "Kimi K3 Free" },
|
||||
{ id: "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free", name: "Nemotron 3 Nano Omni 30B A3B Reasoning:Free" },
|
||||
{ id: "nvidia/nemotron-3-super-120b-a12b", name: "Nemotron 3 Super 120B A12B" },
|
||||
{ id: "openai/gpt-4o-mini", name: "Gpt 4O Mini" },
|
||||
{ id: "openai/gpt-5", name: "Gpt 5" },
|
||||
{ id: "openai/gpt-5-image", name: "Gpt 5 Image" },
|
||||
{ id: "openai/gpt-5-image-mini", name: "Gpt 5 Image Mini" },
|
||||
{ id: "openai/gpt-5-mini", name: "Gpt 5 Mini" },
|
||||
{ id: "openai/gpt-5.2", name: "Gpt 5.2" },
|
||||
{ id: "openai/gpt-5.4", name: "Gpt 5.4" },
|
||||
{ id: "openai/gpt-5.4-image-2", name: "Gpt 5.4 Image 2", kind: "image" },
|
||||
{ id: "openai/gpt-5.4-mini", name: "Gpt 5.4 Mini" },
|
||||
{ id: "openai/gpt-5.4-nano", name: "Gpt 5.4 Nano" },
|
||||
{ id: "openai/gpt-5.4-pro", name: "Gpt 5.4 Pro" },
|
||||
{ id: "openai/gpt-5.5", name: "Gpt 5.5" },
|
||||
{ id: "openai/gpt-5.5-pro", name: "Gpt 5.5 Pro" },
|
||||
{ id: "openai/gpt-5.6-luna", name: "Gpt 5.6 Luna" },
|
||||
{ id: "openai/gpt-5.6-sol", name: "Gpt 5.6 Sol" },
|
||||
{ id: "openai/gpt-5.6-terra", name: "Gpt 5.6 Terra" },
|
||||
{ id: "openai/gpt-audio", name: "Gpt Audio", kind: "audio" },
|
||||
{ id: "openai/gpt-audio-mini", name: "Gpt Audio Mini", kind: "audio" },
|
||||
{ id: "openai/gpt-oss-120b", name: "Gpt Oss 120B" },
|
||||
{ id: "qwen/qwen3-coder-next", name: "Qwen3 Coder Next" },
|
||||
{ id: "qwen/qwen3.5-122b-a10b", name: "Qwen3.5 122B A10B" },
|
||||
{ id: "qwen/qwen3.5-35b-a3b", name: "Qwen3.5 35B A3B" },
|
||||
{ id: "qwen/qwen3.5-397b-a17b", name: "Qwen3.5 397B A17B" },
|
||||
{ id: "qwen/qwen3.5-9b", name: "Qwen3.5 9B" },
|
||||
{ id: "qwen/qwen3.5-flash", name: "Qwen3.5 Flash" },
|
||||
{ id: "qwen/qwen3.5-plus-02-15", name: "Qwen3.5 Plus 02 15" },
|
||||
{ id: "qwen/qwen3.6-plus", name: "Qwen3.6 Plus" },
|
||||
{ id: "qwen/qwen3.7-max", name: "Qwen3.7 Max" },
|
||||
{ id: "qwen/qwen3.7-plus", name: "Qwen3.7 Plus" },
|
||||
{ id: "qwen/qwen3.8-max", name: "Qwen3.8 Max" },
|
||||
{ id: "qwen3.5-omni-plus", name: "Qwen3.5 Omni Plus" },
|
||||
{ id: "qwen3.6-flash", name: "Qwen3.6 Flash" },
|
||||
{ id: "sakana/fugu-ultra", name: "Fugu Ultra" },
|
||||
{ id: "seed-2-0-code-preview-260328", name: "Seed 2 0 Code Preview 260328" },
|
||||
{ id: "seed-2-0-lite-260428", name: "Seed 2 0 Lite 260428" },
|
||||
{ id: "seed-2-0-mini-260428", name: "Seed 2 0 Mini 260428" },
|
||||
{ id: "seed-2-0-pro-260328", name: "Seed 2 0 Pro 260328" },
|
||||
{ id: "stepfun/step-3.5-flash", name: "Step 3.5 Flash" },
|
||||
{ id: "stepfun/step-3.7-flash", name: "Step 3.7 Flash" },
|
||||
{ id: "tencent/hy3-preview", name: "Hy3 Preview" },
|
||||
{ id: "x-ai/grok-4.1-fast", name: "Grok 4.1 Fast" },
|
||||
{ id: "x-ai/grok-4.20-beta", name: "Grok 4.20 Beta" },
|
||||
{ id: "x-ai/grok-4.3", name: "Grok 4.3" },
|
||||
{ id: "x-ai/grok-4.5", name: "Grok 4.5" },
|
||||
{ id: "x-ai/grok-build-0.1", name: "Grok Build 0.1" },
|
||||
{ id: "xiaomi/mimo-v2-flash", name: "Mimo V2 Flash" },
|
||||
{ id: "xiaomi/mimo-v2-omni", name: "Mimo V2 Omni" },
|
||||
{ id: "xiaomi/mimo-v2-pro", name: "Mimo V2 Pro" },
|
||||
{ id: "xiaomi/mimo-v2.5", name: "Mimo V2.5" },
|
||||
{ id: "xiaomi/mimo-v2.5-pro", name: "Mimo V2.5 Pro" },
|
||||
{ id: "z-ai/glm-4.5-air", name: "Glm 4.5 Air" },
|
||||
{ id: "z-ai/glm-4.6", name: "Glm 4.6" },
|
||||
{ id: "z-ai/glm-4.6v", name: "Glm 4.6V" },
|
||||
{ id: "z-ai/glm-4.7", name: "Glm 4.7" },
|
||||
{ id: "z-ai/glm-5", name: "Glm 5" },
|
||||
{ id: "z-ai/glm-5-turbo", name: "Glm 5 Turbo" },
|
||||
{ id: "z-ai/glm-5.1", name: "Glm 5.1" },
|
||||
{ id: "z-ai/glm-5.2", name: "Glm 5.2" },
|
||||
],
|
||||
serviceKinds: ["llm", "embedding", "image"],
|
||||
embeddingConfig: {
|
||||
baseUrl: "https://api.tokenrouter.com/v1/embeddings",
|
||||
authType: "apikey",
|
||||
authHeader: "bearer",
|
||||
},
|
||||
imageConfig: {
|
||||
baseUrl: "https://api.tokenrouter.com/v1/images/generations",
|
||||
},
|
||||
modelsFetcher: { url: "https://api.tokenrouter.com/v1/models", type: "openai" },
|
||||
passthroughModels: true,
|
||||
};
|
||||
76
open-sse/providers/registry/trae.js
Normal file
76
open-sse/providers/registry/trae.js
Normal file
@@ -0,0 +1,76 @@
|
||||
// Trae (ByteDance marscode) provider registry entry.
|
||||
// Chat = SOLO remote agent API:
|
||||
// POST {base}/chat_sessions → {data:{chat_session_id, message_id}}
|
||||
// GET {base}/chat_sessions/{id}/events?reply_to_message_id=... → SSE
|
||||
// Auth: Authorization: Cloud-IDE-JWT <jwt>
|
||||
export default {
|
||||
id: "trae",
|
||||
alias: "tr",
|
||||
uiAlias: "tr",
|
||||
aliases: ["marscode"],
|
||||
category: "oauth",
|
||||
authType: "oauth",
|
||||
hasOAuth: true,
|
||||
authModes: ["oauth"],
|
||||
display: {
|
||||
name: "Trae",
|
||||
icon: "bolt",
|
||||
color: "#FF6A00",
|
||||
textIcon: "TR",
|
||||
website: "https://www.trae.ai",
|
||||
notice: { signupUrl: "https://www.trae.ai" },
|
||||
},
|
||||
transport: {
|
||||
// SOLO remote agent base — verified working chat endpoint.
|
||||
baseUrl: "https://core-normal.trae.ai/api/remote/v1",
|
||||
format: "openai",
|
||||
headers: {
|
||||
"X-Trae-Client-Type": "web",
|
||||
"X-Preferenced-Language": "en",
|
||||
"Referer": "https://solo.trae.ai/",
|
||||
},
|
||||
// Auth: Cloud-IDE-JWT scheme on Authorization — injected by executor buildHeaders.
|
||||
auth: {
|
||||
combined: true,
|
||||
header: "Authorization",
|
||||
scheme: "Cloud-IDE-JWT",
|
||||
},
|
||||
usage: {
|
||||
url: "https://api.marscode.com/cloudide/api/v3/trae/GetUserInfo",
|
||||
},
|
||||
regions: {
|
||||
cn: "https://api.marscode.com",
|
||||
sg: "https://api.trae.ai",
|
||||
us: "https://www.trae.ai",
|
||||
},
|
||||
defaultRegion: "cn",
|
||||
},
|
||||
oauth: {
|
||||
clientId: "ono9krqynydwx5",
|
||||
clientSecret: "-",
|
||||
platform: "trae",
|
||||
pollInterval: 1500,
|
||||
// Login guidance returns LoginHost for browser open.
|
||||
loginGuidanceUrl: "https://api.marscode.com/cloudide/api/v3/trae/GetLoginGuidance",
|
||||
// ExchangeToken: refresh -> access (POST JSON, body below).
|
||||
tokenUrl: "https://api.marscode.com/cloudide/api/v3/trae/oauth/ExchangeToken",
|
||||
exchangeTokenUrl: "https://api.marscode.com/cloudide/api/v3/trae/oauth/ExchangeToken",
|
||||
refreshUrl: "https://api.marscode.com/cloudide/api/v3/trae/oauth/ExchangeToken",
|
||||
userInfoUrl: "https://api.marscode.com/cloudide/api/v3/trae/GetUserInfo",
|
||||
// Trae refresh uses custom JSON body, not OAuth form — handled by refresh.js, not config-driven.
|
||||
refresh: { encoding: "json" },
|
||||
},
|
||||
// Model catalog (IDE flow, core-normal.trae.ai).
|
||||
models: [
|
||||
{ id: "auto", name: "Auto (Server Picks)" },
|
||||
{ id: "work", name: "Work (Fast)" },
|
||||
{ id: "gemini-3.1-pro", name: "Gemini 3.1 Pro" },
|
||||
{ id: "gemini-3-flash-solo", name: "Gemini 3 Flash" },
|
||||
{ id: "minimax-m3", name: "MiniMax M3" },
|
||||
{ id: "minimax-m2.7", name: "MiniMax M2.7" },
|
||||
{ id: "kimi-k2.5", name: "Kimi K2.5" },
|
||||
{ id: "gpt-5.4", name: "GPT 5.4" },
|
||||
{ id: "gpt-5.2", name: "GPT 5.2" },
|
||||
],
|
||||
features: { usage: true },
|
||||
};
|
||||
143
open-sse/providers/registry/windsurf.js
Normal file
143
open-sse/providers/registry/windsurf.js
Normal file
@@ -0,0 +1,143 @@
|
||||
// Windsurf provider registry — Firebase+Codeium+Devin auth chain.
|
||||
// Chat = Codeium gRPC-web protobuf:
|
||||
// POST {base} Content-Type: application/grpc-web+proto
|
||||
// Service: exa.language_server_pb.LanguageServerService / GetChatMessage
|
||||
export default {
|
||||
id: "windsurf",
|
||||
alias: "ws",
|
||||
uiAlias: "ws",
|
||||
display: {
|
||||
name: "Windsurf",
|
||||
icon: "surfing",
|
||||
color: "#14B8A6",
|
||||
website: "https://windsurf.com",
|
||||
notice: { signupUrl: "https://windsurf.com" },
|
||||
},
|
||||
category: "oauth",
|
||||
authType: "oauth",
|
||||
hasOAuth: true,
|
||||
authModes: ["oauth", "apikey"],
|
||||
|
||||
transport: {
|
||||
baseUrl: "https://server.codeium.com/exa.language_server_pb.LanguageServerService/GetChatMessage",
|
||||
format: "openai",
|
||||
headers: {
|
||||
"Content-Type": "application/grpc-web+proto",
|
||||
"Accept": "application/grpc-web+proto",
|
||||
"X-Grpc-Web": "1",
|
||||
},
|
||||
// apiKey (sk-ws-... or Firebase-derived) as Bearer + in protobuf Metadata.api_key.
|
||||
auth: { combined: true, header: "Authorization", scheme: "Bearer" },
|
||||
},
|
||||
|
||||
// Auth chain (4 terminal paths, all yield apiKey):
|
||||
// 1) OAuth web → Firebase JWT → POST register.windsurf.com/.../RegisterUser {firebase_id_token} → {apiKey, apiServerUrl, name}
|
||||
// 2) sk-ws-... direct API key (apiKey used as metadata.apiKey on GetUserStatus)
|
||||
// 3) Firebase JWT (eyJ...) → same RegisterUser exchange as #1
|
||||
// 4) Devin auth1_... → self-serve chain → ide_token used as apiKey on server.self-serve.windsurf.com
|
||||
oauth: {
|
||||
clientId: "3GUryQ7ldAeKEuD2obYnppsnmj58eP5u",
|
||||
firebaseApiKey: "AIzaSyDsOl-1XpT5err0Tcn0TFFod1H8gVGIycY",
|
||||
firebaseSignInUrl: "https://identitytoolkit.googleapis.com/v1/accounts:signInWithPassword",
|
||||
registerUrl: "https://register.windsurf.com/exa.seat_management_pb.SeatManagementService/RegisterUser",
|
||||
apiServerUrl: "https://server.codeium.com",
|
||||
auth1ApiServerUrl: "https://server.self-serve.windsurf.com",
|
||||
platform: "windsurf",
|
||||
// Quota (Connect RPC, protobuf): POST windsurf.com/_backend/.../GetPlanStatus,
|
||||
// headers Content-Type:application/proto + Connect-Protocol-Version:1 + X-Auth-Token:<session>,
|
||||
// body = field1:session_token, field2:varint 1.
|
||||
quotaUrl: "https://windsurf.com/_backend/exa.seat_management_pb.SeatManagementService/GetPlanStatus",
|
||||
},
|
||||
|
||||
// Catalog verified against model_configs_v2.bin from Devin CLI (2026.5.x).
|
||||
// Dot-notation ids; the executor MODEL_ALIAS_MAP maps these to Windsurf modelUid.
|
||||
// contextLength dropped — 9router schema uses id+name only.
|
||||
models: [
|
||||
// Cognition / SWE
|
||||
{ id: "swe-1.6-fast", name: "SWE-1.6 Fast" },
|
||||
{ id: "swe-1.6", name: "SWE-1.6" },
|
||||
{ id: "swe-1.5-fast", name: "SWE-1.5 Fast" },
|
||||
{ id: "swe-1.5", name: "SWE-1.5" },
|
||||
// Claude Opus 4.7 — effort-tiered
|
||||
{ id: "claude-opus-4.7-max", name: "Claude Opus 4.7 Max" },
|
||||
{ id: "claude-opus-4.7-xhigh", name: "Claude Opus 4.7 XHigh" },
|
||||
{ id: "claude-opus-4.7-high", name: "Claude Opus 4.7 High" },
|
||||
{ id: "claude-opus-4.7-medium", name: "Claude Opus 4.7 Medium" },
|
||||
{ id: "claude-opus-4.7-low", name: "Claude Opus 4.7 Low" },
|
||||
{ id: "claude-opus-4.7-review", name: "Claude Opus 4.7 Review" },
|
||||
// Claude Sonnet/Opus 4.6
|
||||
{ id: "claude-sonnet-4.6-thinking-1m", name: "Claude Sonnet 4.6 Thinking 1M" },
|
||||
{ id: "claude-sonnet-4.6-1m", name: "Claude Sonnet 4.6 1M" },
|
||||
{ id: "claude-sonnet-4.6-thinking", name: "Claude Sonnet 4.6 Thinking" },
|
||||
{ id: "claude-sonnet-4.6", name: "Claude Sonnet 4.6" },
|
||||
{ id: "claude-opus-4.6-thinking", name: "Claude Opus 4.6 Thinking" },
|
||||
{ id: "claude-opus-4.6", name: "Claude Opus 4.6" },
|
||||
// Claude 4.5
|
||||
{ id: "claude-opus-4.5-thinking", name: "Claude Opus 4.5 Thinking" },
|
||||
{ id: "claude-opus-4.5", name: "Claude Opus 4.5" },
|
||||
{ id: "claude-sonnet-4.5-thinking", name: "Claude Sonnet 4.5 Thinking" },
|
||||
{ id: "claude-sonnet-4.5", name: "Claude Sonnet 4.5" },
|
||||
{ id: "claude-haiku-4.5", name: "Claude Haiku 4.5" },
|
||||
// GPT-5.5 — effort-tiered
|
||||
{ id: "gpt-5.5-xhigh-fast", name: "GPT-5.5 XHigh Fast" },
|
||||
{ id: "gpt-5.5-xhigh", name: "GPT-5.5 XHigh" },
|
||||
{ id: "gpt-5.5-high-fast", name: "GPT-5.5 High Fast" },
|
||||
{ id: "gpt-5.5-high", name: "GPT-5.5 High" },
|
||||
{ id: "gpt-5.5-medium-fast", name: "GPT-5.5 Medium Fast" },
|
||||
{ id: "gpt-5.5-medium", name: "GPT-5.5 Medium" },
|
||||
{ id: "gpt-5.5-low-fast", name: "GPT-5.5 Low Fast" },
|
||||
{ id: "gpt-5.5-low", name: "GPT-5.5 Low" },
|
||||
{ id: "gpt-5.5-none-fast", name: "GPT-5.5 None Fast" },
|
||||
{ id: "gpt-5.5-none", name: "GPT-5.5 None" },
|
||||
// GPT-5.4 — effort-tiered
|
||||
{ id: "gpt-5.4-xhigh-fast", name: "GPT-5.4 XHigh Fast" },
|
||||
{ id: "gpt-5.4-xhigh", name: "GPT-5.4 XHigh" },
|
||||
{ id: "gpt-5.4-high-fast", name: "GPT-5.4 High Fast" },
|
||||
{ id: "gpt-5.4-high", name: "GPT-5.4 High" },
|
||||
{ id: "gpt-5.4-medium-fast", name: "GPT-5.4 Medium Fast" },
|
||||
{ id: "gpt-5.4-medium", name: "GPT-5.4 Medium" },
|
||||
{ id: "gpt-5.4-low-fast", name: "GPT-5.4 Low Fast" },
|
||||
{ id: "gpt-5.4-low", name: "GPT-5.4 Low" },
|
||||
{ id: "gpt-5.4-none-fast", name: "GPT-5.4 None Fast" },
|
||||
{ id: "gpt-5.4-none", name: "GPT-5.4 None" },
|
||||
{ id: "gpt-5.4-mini-xhigh", name: "GPT-5.4 Mini XHigh" },
|
||||
{ id: "gpt-5.4-mini-high", name: "GPT-5.4 Mini High" },
|
||||
{ id: "gpt-5.4-mini-medium", name: "GPT-5.4 Mini Medium" },
|
||||
{ id: "gpt-5.4-mini-low", name: "GPT-5.4 Mini Low" },
|
||||
// GPT-5.3 Codex
|
||||
{ id: "gpt-5.3-codex-xhigh-fast", name: "GPT-5.3 Codex XHigh Fast" },
|
||||
{ id: "gpt-5.3-codex-xhigh", name: "GPT-5.3 Codex XHigh" },
|
||||
{ id: "gpt-5.3-codex-high-fast", name: "GPT-5.3 Codex High Fast" },
|
||||
{ id: "gpt-5.3-codex-high", name: "GPT-5.3 Codex High" },
|
||||
{ id: "gpt-5.3-codex-medium-fast", name: "GPT-5.3 Codex Medium Fast" },
|
||||
{ id: "gpt-5.3-codex-medium", name: "GPT-5.3 Codex Medium" },
|
||||
{ id: "gpt-5.3-codex-low-fast", name: "GPT-5.3 Codex Low Fast" },
|
||||
{ id: "gpt-5.3-codex-low", name: "GPT-5.3 Codex Low" },
|
||||
// GPT-5.2 / 5
|
||||
{ id: "gpt-5.2-xhigh", name: "GPT-5.2 XHigh" },
|
||||
{ id: "gpt-5.2-high", name: "GPT-5.2 High" },
|
||||
{ id: "gpt-5.2-medium", name: "GPT-5.2 Medium" },
|
||||
{ id: "gpt-5.2-low", name: "GPT-5.2 Low" },
|
||||
{ id: "gpt-5.2-none", name: "GPT-5.2 None" },
|
||||
{ id: "gpt-5", name: "GPT-5" },
|
||||
// GPT-4.1 / 4o
|
||||
{ id: "gpt-4.1", name: "GPT-4.1" },
|
||||
{ id: "gpt-4.1-mini", name: "GPT-4.1 Mini" },
|
||||
{ id: "gpt-4.1-nano", name: "GPT-4.1 Nano" },
|
||||
{ id: "gpt-4o", name: "GPT-4o" },
|
||||
{ id: "gpt-4o-mini", name: "GPT-4o Mini" },
|
||||
// Gemini
|
||||
{ id: "gemini-3.1-pro-high", name: "Gemini 3.1 Pro High" },
|
||||
{ id: "gemini-3.1-pro-low", name: "Gemini 3.1 Pro Low" },
|
||||
{ id: "gemini-3.0-flash-high", name: "Gemini 3 Flash High" },
|
||||
{ id: "gemini-3.0-flash-medium", name: "Gemini 3 Flash Medium" },
|
||||
{ id: "gemini-3.0-flash-low", name: "Gemini 3 Flash Low" },
|
||||
{ id: "gemini-3.0-flash-minimal", name: "Gemini 3 Flash Minimal" },
|
||||
{ id: "gemini-2.5-pro", name: "Gemini 2.5 Pro" },
|
||||
// Others
|
||||
{ id: "deepseek-v4", name: "DeepSeek V4" },
|
||||
{ id: "kimi-k2.6", name: "Kimi K2.6" },
|
||||
{ id: "kimi-k2.5", name: "Kimi K2.5" },
|
||||
{ id: "glm-5.1", name: "GLM-5.1" },
|
||||
],
|
||||
};
|
||||
@@ -32,9 +32,13 @@ export default {
|
||||
{ id: "grok-code-fast-1", name: "Grok Code Fast" },
|
||||
{ id: "grok-3", name: "Grok 3" },
|
||||
{ id: "grok-2-image-1212", name: "Grok 2 Image", params: ["n","response_format"], kind: "image" },
|
||||
{ id: "grok-imagine-video", name: "Grok Imagine Video", params: ["duration","aspect_ratio","resolution"], kind: "video" },
|
||||
],
|
||||
serviceKinds: ["llm","imageToText","webSearch","image"],
|
||||
serviceKinds: ["llm","imageToText","webSearch","image","video"],
|
||||
imageConfig: { baseUrl: "https://api.x.ai/v1/images/generations", bodyFields: ["model","prompt","n","response_format"] },
|
||||
// Async video jobs (POST returns { request_id }, GET polls until done/failed).
|
||||
// Docs: https://docs.x.ai/developers/rest-api-reference/inference/videos
|
||||
videoConfig: { baseUrl: "https://api.x.ai/v1/videos" },
|
||||
searchViaChat: {
|
||||
defaultModel: "grok-4.20-reasoning",
|
||||
endpoint: "https://api.x.ai/v1/responses",
|
||||
|
||||
@@ -15,10 +15,11 @@ export default {
|
||||
textIcon: "XM",
|
||||
website: "https://xiaomimimo.com",
|
||||
notice: {
|
||||
apiKeyUrl: "https://xiaomimimo.com",
|
||||
apiKeyUrl: "https://platform.xiaomimimo.com/console/api-keys",
|
||||
},
|
||||
},
|
||||
category: "apikey",
|
||||
serviceKinds: ["llm", "tts"],
|
||||
transport: {
|
||||
baseUrl: "https://api.xiaomimimo.com/v1/chat/completions",
|
||||
validateUrl: "https://api.xiaomimimo.com/v1/models",
|
||||
@@ -42,5 +43,12 @@ export default {
|
||||
{ id: "mimo-v2.5", name: "MiMo V2.5" },
|
||||
{ id: "mimo-v2-omni", name: "MiMo V2 Omni" },
|
||||
{ id: "mimo-v2-flash", name: "MiMo V2 Flash" },
|
||||
{ id: "mimo-v2.5-tts", name: "MiMo V2.5 TTS", kind: "tts" },
|
||||
],
|
||||
ttsConfig: {
|
||||
baseUrl: "https://api.xiaomimimo.com/v1/chat/completions",
|
||||
authType: "apikey",
|
||||
authHeader: "bearer",
|
||||
format: "xiaomi-mimo-tts",
|
||||
},
|
||||
};
|
||||
|
||||
71
open-sse/providers/registry/zed.js
Normal file
71
open-sse/providers/registry/zed.js
Normal file
@@ -0,0 +1,71 @@
|
||||
// Zed provider — RSA keypair callback auth (NOT standard OAuth).
|
||||
export default {
|
||||
id: "zed",
|
||||
priority: 10,
|
||||
alias: "zd",
|
||||
uiAlias: "zd",
|
||||
hidden: true,
|
||||
display: {
|
||||
name: "Zed",
|
||||
icon: "code",
|
||||
color: "#A855F7",
|
||||
website: "https://zed.dev",
|
||||
notice: {
|
||||
signupUrl: "https://zed.dev/native_app_signin",
|
||||
},
|
||||
},
|
||||
category: "oauth",
|
||||
authType: "oauth",
|
||||
hasOAuth: true,
|
||||
|
||||
transport: {
|
||||
// Zed hosted LLM aggregator: cloud.zed.dev/completions is a
|
||||
// multi-format proxy fronting Anthropic/OpenAI/Google/xAI depending on the model.
|
||||
// Wire protocol = NDJSON/SSE-ish stream authenticated with a short-lived LLM bearer
|
||||
// token exchanged from the RSA-decrypted access_token (see open-sse/shared/zedAuth).
|
||||
baseUrl: "https://cloud.zed.dev/completions",
|
||||
format: "openai",
|
||||
forceStream: true,
|
||||
headers: {
|
||||
"content-type": "application/json",
|
||||
},
|
||||
// Auth scheme is non-standard: "Authorization: <user_id> <access_token>" plus a duplicate
|
||||
// x-zed-cloud-token header (verified in zed_account.rs build_authorization_header +
|
||||
// cloud fetch). Executor builds both; scheme here is a marker for config-driven tooling.
|
||||
auth: {
|
||||
combined: true,
|
||||
header: "Authorization",
|
||||
scheme: "<user_id> <access_token>", // placeholder — real value built in executor
|
||||
},
|
||||
usage: {
|
||||
url: "https://cloud.zed.dev/client/users/me", // verified in zed_account.rs
|
||||
},
|
||||
// Live catalog discovery — Zed's hosted model list changes frequently and is fetched
|
||||
// per-connection rather than hardcoded.
|
||||
modelsUrl: "https://cloud.zed.dev/models",
|
||||
},
|
||||
|
||||
// Empty static catalog + passthrough: Zed fronts a rotating set of upstream models
|
||||
// (Claude/GPT/Gemini/Grok). Resolved live via modelsUrl; any client-sent model id is
|
||||
// forwarded as-is rather than validated against a frozen list.
|
||||
models: [],
|
||||
passthroughModels: true,
|
||||
|
||||
oauth: {
|
||||
// Zed auth flow is RSA-based, NOT OAuth2/PKCE:
|
||||
// 1. App generates RSA-2048 keypair locally (PKCS#1 DER, URL-safe base64).
|
||||
// 2. Bind random TCP port on 127.0.0.1.
|
||||
// 3. Open https://zed.dev/native_app_signin?native_app_port={port}&native_app_public_key={pub}.
|
||||
// 4. After login, browser redirects http://127.0.0.1:{port}/?user_id=...&access_token=...
|
||||
// where access_token = base64(RSA-encrypted plaintext token).
|
||||
// 5. Decrypt with private key (OAEP-SHA256, fallback PKCS1v15). Store user_id + plaintext token.
|
||||
// No clientId/clientSecret/tokenUrl/refreshUrl — long-lived access_token, no refresh.
|
||||
authorizeUrl: "https://zed.dev/native_app_signin",
|
||||
platform: "zed",
|
||||
rsaKeyExchange: true, // new flag: signals frontend/router this flow needs local RSA + TCP listener.
|
||||
},
|
||||
|
||||
features: {
|
||||
usage: true,
|
||||
},
|
||||
};
|
||||
@@ -47,6 +47,26 @@ export const CLAUDE_CLI_SPOOF_HEADERS = {
|
||||
"X-Stainless-Timeout": "600"
|
||||
};
|
||||
|
||||
const ANTHROPIC_BETA_BASE = [
|
||||
"claude-code-20250219",
|
||||
"oauth-2025-04-20",
|
||||
"interleaved-thinking-2025-05-14",
|
||||
"context-management-2025-06-27",
|
||||
"prompt-caching-scope-2026-01-05",
|
||||
"structured-outputs-2025-12-15",
|
||||
"fast-mode-2026-02-01",
|
||||
"redact-thinking-2026-02-12",
|
||||
"token-efficient-tools-2026-03-28",
|
||||
];
|
||||
const ANTHROPIC_BETA_HEAVY_AGENT = ["advanced-tool-use-2025-11-20", "effort-2025-11-24"];
|
||||
|
||||
// Heavy-agent beta flags are gated to opus/sonnet — cheaper models don't need them.
|
||||
export function selectAnthropicBeta(model = "") {
|
||||
const flags = [...ANTHROPIC_BETA_BASE];
|
||||
if (/^claude-(opus|sonnet)/.test(model)) flags.push(...ANTHROPIC_BETA_HEAVY_AGENT);
|
||||
return flags.join(",");
|
||||
}
|
||||
|
||||
// Shared baseUrls
|
||||
export const KIMI_CODING_BASE_URL = "https://api.kimi.com/coding/v1/messages";
|
||||
|
||||
@@ -54,6 +74,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://daily-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",
|
||||
|
||||
55
open-sse/providers/thinkingLevels.js
Normal file
55
open-sse/providers/thinkingLevels.js
Normal file
@@ -0,0 +1,55 @@
|
||||
// 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";
|
||||
import { resolveKiroEffortPath } from "../config/kiroConstants.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,
|
||||
};
|
||||
|
||||
const CODEX_GPT_5_6_LEVELS = ["none", "minimal", "low", "medium", "high", "xhigh", "max"];
|
||||
|
||||
// Model-name pattern overrides (glob, first match wins) — more precise than format default.
|
||||
const PATTERN_THINKING = [
|
||||
{ provider: "codex", pattern: "*gpt-5.6-sol*", levels: [...CODEX_GPT_5_6_LEVELS, "ultra"] },
|
||||
{ provider: "codex", pattern: "*gpt-5.6-terra*", levels: [...CODEX_GPT_5_6_LEVELS, "ultra"] },
|
||||
{ provider: "codex", pattern: "*gpt-5.6-luna*", levels: CODEX_GPT_5_6_LEVELS },
|
||||
{ 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) {
|
||||
if (provider === "kiro" && resolveKiroEffortPath(model) === null) return null;
|
||||
const caps = getCapabilitiesForModel(provider, model);
|
||||
if (!caps.reasoning) return null;
|
||||
const hit = PATTERN_THINKING.find((entry) =>
|
||||
(!entry.provider || entry.provider === provider) && matchPattern(entry.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