anygate 0.5.11 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-55RHVPE4.js → chunk-CRK6YGKY.js} +1290 -682
- package/dist/chunk-CRK6YGKY.js.map +1 -0
- package/dist/{chunk-5UF4TVCM.js → chunk-QLHVQYQN.js} +23 -3
- package/dist/chunk-QLHVQYQN.js.map +1 -0
- package/dist/{chunk-72WNE2IK.js → chunk-UT3JLF3M.js} +2 -13
- package/dist/{chunk-6AFYEDSU.js → chunk-VGM6EBG4.js} +10 -4
- package/dist/{chunk-6AFYEDSU.js.map → chunk-VGM6EBG4.js.map} +1 -1
- package/dist/cli.js +1124 -567
- package/dist/cli.js.map +1 -1
- package/dist/{command-7AI36ICY.js → command-PFFQI5YC.js} +185 -88
- package/dist/command-PFFQI5YC.js.map +1 -0
- package/dist/{constants-HE3EOSMH.js → constants-GW5BAY6G.js} +9 -3
- package/dist/{provider-templates-MNJZTG3Z.js → provider-templates-CRQJII3Z.js} +3 -3
- package/dist/registry/data/templates/agentrouter.json +19 -0
- package/dist/ui/dist/assets/{index-DWAOH_B3.css → index-D4hWZLit.css} +1 -1
- package/dist/ui/dist/assets/index-DyxtUjA-.js +7 -0
- package/dist/ui/dist/index.html +2 -2
- package/package.json +108 -94
- package/dist/chunk-55RHVPE4.js.map +0 -1
- package/dist/chunk-5UF4TVCM.js.map +0 -1
- package/dist/command-7AI36ICY.js.map +0 -1
- package/dist/ui/dist/assets/index-qxVU3kMy.js +0 -6
- /package/dist/{chunk-72WNE2IK.js.map → chunk-UT3JLF3M.js.map} +0 -0
- /package/dist/{constants-HE3EOSMH.js.map → constants-GW5BAY6G.js.map} +0 -0
- /package/dist/{provider-templates-MNJZTG3Z.js.map → provider-templates-CRQJII3Z.js.map} +0 -0
|
@@ -7,7 +7,7 @@ import { join } from "path";
|
|
|
7
7
|
// package.json
|
|
8
8
|
var package_default = {
|
|
9
9
|
name: "anygate",
|
|
10
|
-
version: "0.
|
|
10
|
+
version: "0.6.0",
|
|
11
11
|
publishConfig: {
|
|
12
12
|
access: "public"
|
|
13
13
|
},
|
|
@@ -48,13 +48,19 @@ var package_default = {
|
|
|
48
48
|
dev: "tsup --watch",
|
|
49
49
|
test: "vitest run",
|
|
50
50
|
"test:watch": "vitest",
|
|
51
|
+
"test:coverage": "vitest run --coverage",
|
|
51
52
|
typecheck: "tsc --noEmit",
|
|
52
53
|
"refresh:models-dev": "node scripts/refresh-models-dev-cache.mjs",
|
|
53
54
|
"audit:context-windows": "tsx scripts/audit-context-windows.ts",
|
|
54
55
|
"generate:context-rules": "tsx scripts/generate-context-rules.ts",
|
|
56
|
+
lint: "eslint src/ --ext .ts",
|
|
57
|
+
"lint:fix": "eslint src/ --ext .ts --fix",
|
|
58
|
+
format: 'prettier --write "src/**/*.ts"',
|
|
59
|
+
"format:check": 'prettier --check "src/**/*.ts"',
|
|
55
60
|
prepublishOnly: `node -e "if (require('./package.json').version !== require('./package-lock.json').version) { console.error('Error: package.json and package-lock.json versions are out of sync! Run npm install to sync.'); process.exit(1); }" && npm run build`,
|
|
56
61
|
"ui:dev": "npm --prefix src/ui/app run dev",
|
|
57
|
-
"ui:build": "npm --prefix src/ui/app run build"
|
|
62
|
+
"ui:build": "npm --prefix src/ui/app run build",
|
|
63
|
+
prepare: "husky"
|
|
58
64
|
},
|
|
59
65
|
dependencies: {
|
|
60
66
|
"@ai-sdk/alibaba": "^1.0.26",
|
|
@@ -89,9 +95,17 @@ var package_default = {
|
|
|
89
95
|
devDependencies: {
|
|
90
96
|
"@types/node": "^22.0.0",
|
|
91
97
|
"@types/ws": "^8.18.1",
|
|
98
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
99
|
+
"@typescript-eslint/parser": "^8.0.0",
|
|
92
100
|
"@vitest/coverage-v8": "^2.1.9",
|
|
101
|
+
eslint: "^9.0.0",
|
|
102
|
+
"eslint-config-prettier": "^9.1.0",
|
|
103
|
+
husky: "^9.1.7",
|
|
104
|
+
"lint-staged": "^16.4.0",
|
|
105
|
+
prettier: "^3.3.0",
|
|
93
106
|
tsup: "^8.0.0",
|
|
94
107
|
typescript: "^5.5.0",
|
|
108
|
+
"typescript-eslint": "^8.65.0",
|
|
95
109
|
vitest: "^2.0.0"
|
|
96
110
|
},
|
|
97
111
|
optionalDependencies: {
|
|
@@ -141,6 +155,9 @@ var CONFLICTING_ENV_VARS = [
|
|
|
141
155
|
var OPENCODE_CACHE_PATH = join(homedir(), ".cache", "opencode", "models.json");
|
|
142
156
|
var MAX_MODEL_CATALOG = 20;
|
|
143
157
|
var GATEWAY_PORT = 17645;
|
|
158
|
+
var RATE_LIMIT_MAX_REQUESTS = 120;
|
|
159
|
+
var RATE_LIMIT_WINDOW_MS = 6e4;
|
|
160
|
+
var MAX_REQUEST_BODY_BYTES = 10 * 1024 * 1024;
|
|
144
161
|
var VERTEX_ANTHROPIC_NPM = "@ai-sdk/google-vertex/anthropic";
|
|
145
162
|
function classifyModelFormat(modelId, providerNpm) {
|
|
146
163
|
if (providerNpm === "@ai-sdk/anthropic") return "anthropic";
|
|
@@ -163,8 +180,11 @@ export {
|
|
|
163
180
|
OPENCODE_CACHE_PATH,
|
|
164
181
|
MAX_MODEL_CATALOG,
|
|
165
182
|
GATEWAY_PORT,
|
|
183
|
+
RATE_LIMIT_MAX_REQUESTS,
|
|
184
|
+
RATE_LIMIT_WINDOW_MS,
|
|
185
|
+
MAX_REQUEST_BODY_BYTES,
|
|
166
186
|
VERTEX_ANTHROPIC_NPM,
|
|
167
187
|
classifyModelFormat,
|
|
168
188
|
VERSION
|
|
169
189
|
};
|
|
170
|
-
//# sourceMappingURL=chunk-
|
|
190
|
+
//# sourceMappingURL=chunk-QLHVQYQN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/config/constants.ts","../package.json"],"sourcesContent":["// src/constants.ts\nimport { homedir } from 'node:os'\nimport { join } from 'node:path'\nimport pkg from '../../package.json' with { type: 'json' }\nimport type { BackendConfig, ModelFormat } from '../types/index.js'\n\nexport const BACKENDS: Record<'zen' | 'go', BackendConfig> = {\n zen: {\n id: 'zen',\n name: 'OpenCode Zen',\n // No /v1 suffix — the Anthropic SDK appends /v1/messages automatically\n baseUrl: 'https://opencode.ai/zen',\n },\n go: {\n id: 'go',\n name: 'OpenCode Go',\n baseUrl: 'https://opencode.ai/zen/go',\n },\n}\n\n// ChatGPT Codex Responses-Lite WebSocket transport (used by models the backend\n// flags with prefer_websockets, e.g. gpt-5.6-luna).\nexport const CODEX_RESPONSES_LITE_WS_URL = 'wss://chatgpt.com/backend-api/codex/responses'\n// `version` header the Codex backend expects on Responses-Lite requests. The\n// official Codex CLI sends its own version here; OpenAI may require this to be\n// bumped over time — confirm via --trace if Luna requests start failing.\nexport const CODEX_RESPONSES_LITE_VERSION = '0.144.1'\n// OpenAI-Beta opt-in for the WebSocket Responses transport.\nexport const CODEX_RESPONSES_WEBSOCKETS_BETA = 'responses_websockets=2026-02-06'\n\n// These must be removed from the child process environment to avoid conflicts\n// with Vertex AI, Bedrock, AWS, Foundry, and any stale Anthropic config.\nexport const CONFLICTING_ENV_VARS = [\n 'CLAUDE_CODE_USE_VERTEX',\n 'ANTHROPIC_VERTEX_PROJECT_ID',\n 'ANTHROPIC_VERTEX_BASE_URL',\n 'CLOUD_ML_REGION',\n 'ANTHROPIC_BEDROCK_BASE_URL',\n 'ANTHROPIC_AWS_BASE_URL',\n 'ANTHROPIC_AWS_API_KEY',\n 'ANTHROPIC_AWS_WORKSPACE_ID',\n 'ANTHROPIC_FOUNDRY_API_KEY',\n 'ANTHROPIC_FOUNDRY_BASE_URL',\n 'ANTHROPIC_AUTH_TOKEN',\n 'ANTHROPIC_API_KEY',\n 'ANTHROPIC_BASE_URL',\n 'ANTHROPIC_MODEL',\n 'ANTHROPIC_DEFAULT_OPUS_MODEL',\n 'ANTHROPIC_DEFAULT_SONNET_MODEL',\n 'ANTHROPIC_DEFAULT_HAIKU_MODEL',\n] as const\n\nexport type ConflictingEnvVar = (typeof CONFLICTING_ENV_VARS)[number]\n\n// Optional enrichment from OpenCode CLI (~/.cache/opencode/models.json) — not a runtime dependency.\nexport const OPENCODE_CACHE_PATH = join(homedir(), '.cache', 'opencode', 'models.json')\n\n/** Max models in favorites list and mid-session /model switch catalog. */\nexport const MAX_MODEL_CATALOG = 20\n\n// Fixed port the `anygate server` gateway binds to. The doctor command probes\n// this same port so users catch clashes before launching the server.\nexport const GATEWAY_PORT = 17645\n\n/** Gateway rate limiting: max requests per client per window. */\nexport const RATE_LIMIT_MAX_REQUESTS = 120\n\n/** Gateway rate limiting: time window in milliseconds. */\nexport const RATE_LIMIT_WINDOW_MS = 60_000\n\n/** Maximum request body size in bytes (10 MB). */\nexport const MAX_REQUEST_BODY_BYTES = 10 * 1024 * 1024\n\n/** Vercel AI SDK package for Anthropic Claude models on Google Vertex AI (ADC auth). */\nexport const VERTEX_ANTHROPIC_NPM = '@ai-sdk/google-vertex/anthropic'\n\n// Classify a model's API format based on cache provider data or ID heuristics.\n// Used to decide whether to route directly or through the translation proxy.\nexport function classifyModelFormat(modelId: string, providerNpm: string | undefined): ModelFormat {\n if (providerNpm === '@ai-sdk/anthropic') return 'anthropic'\n if (providerNpm === '@ai-sdk/openai') return 'unsupported'\n if (providerNpm === '@ai-sdk/google') return 'unsupported'\n\n // Fallback: ID-prefix heuristics for models not in cache\n const lower = modelId.toLowerCase()\n if (lower.startsWith('claude-')) return 'anthropic'\n if (lower.startsWith('gpt-')) return 'unsupported'\n if (lower.startsWith('gemini-')) return 'unsupported'\n\n return 'openai'\n}\n\nexport const VERSION = pkg.version\n","{\n \"name\": \"anygate\",\n \"version\": \"0.6.0\",\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"description\": \"Route any model into any coding agent — launch Claude Code, Codex, and more with multi-provider gateways\",\n \"author\": \"ramananbuilds\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/ramananbuilds/anygate.git\"\n },\n \"homepage\": \"https://github.com/ramananbuilds/anygate#readme\",\n \"bugs\": {\n \"url\": \"https://github.com/ramananbuilds/anygate/issues\"\n },\n \"keywords\": [\n \"claude\",\n \"claude-code\",\n \"codex\",\n \"ai\",\n \"llm\",\n \"cli\",\n \"gateway\",\n \"vertex\"\n ],\n \"type\": \"module\",\n \"bin\": {\n \"anygate\": \"dist/cli.js\"\n },\n \"files\": [\n \"dist\",\n \"README.md\"\n ],\n \"engines\": {\n \"node\": \">=18\"\n },\n \"scripts\": {\n \"build\": \"tsup && npm run ui:build && node scripts/copy-ui-assets.mjs\",\n \"dev\": \"tsup --watch\",\n \"test\": \"vitest run\",\n \"test:watch\": \"vitest\",\n \"test:coverage\": \"vitest run --coverage\",\n \"typecheck\": \"tsc --noEmit\",\n \"refresh:models-dev\": \"node scripts/refresh-models-dev-cache.mjs\",\n \"audit:context-windows\": \"tsx scripts/audit-context-windows.ts\",\n \"generate:context-rules\": \"tsx scripts/generate-context-rules.ts\",\n \"lint\": \"eslint src/ --ext .ts\",\n \"lint:fix\": \"eslint src/ --ext .ts --fix\",\n \"format\": \"prettier --write \\\"src/**/*.ts\\\"\",\n \"format:check\": \"prettier --check \\\"src/**/*.ts\\\"\",\n \"prepublishOnly\": \"node -e \\\"if (require('./package.json').version !== require('./package-lock.json').version) { console.error('Error: package.json and package-lock.json versions are out of sync! Run npm install to sync.'); process.exit(1); }\\\" && npm run build\",\n \"ui:dev\": \"npm --prefix src/ui/app run dev\",\n \"ui:build\": \"npm --prefix src/ui/app run build\",\n \"prepare\": \"husky\"\n },\n \"dependencies\": {\n \"@ai-sdk/alibaba\": \"^1.0.26\",\n \"@ai-sdk/amazon-bedrock\": \"^4.0.113\",\n \"@ai-sdk/azure\": \"^3.0.70\",\n \"@ai-sdk/cerebras\": \"^2.0.54\",\n \"@ai-sdk/cohere\": \"^3.0.36\",\n \"@ai-sdk/deepinfra\": \"^2.0.52\",\n \"@ai-sdk/gateway\": \"^3.0.125\",\n \"@ai-sdk/google\": \"^3.0.80\",\n \"@ai-sdk/google-vertex\": \"^4.0.142\",\n \"@ai-sdk/groq\": \"^3.0.39\",\n \"@ai-sdk/mistral\": \"^3.0.37\",\n \"@ai-sdk/openai\": \"^3.0.68\",\n \"@ai-sdk/openai-compatible\": \"^2.0.48\",\n \"@ai-sdk/perplexity\": \"^3.0.33\",\n \"@ai-sdk/togetherai\": \"^2.0.53\",\n \"@ai-sdk/vercel\": \"^2.0.50\",\n \"@ai-sdk/xai\": \"^3.0.93\",\n \"@clack/prompts\": \"^0.9.1\",\n \"@openrouter/ai-sdk-provider\": \"^2.9.0\",\n \"ai\": \"^6.0.197\",\n \"gitlab-ai-provider\": \"^6.8.0\",\n \"ipaddr.js\": \"^2.4.0\",\n \"open\": \"^11.0.0\",\n \"picocolors\": \"^1.1.1\",\n \"smol-toml\": \"^1.6.1\",\n \"venice-ai-sdk-provider\": \"^2.0.2\",\n \"ws\": \"^8.21.0\",\n \"zod\": \"^3.25.76\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^22.0.0\",\n \"@types/ws\": \"^8.18.1\",\n \"@typescript-eslint/eslint-plugin\": \"^8.0.0\",\n \"@typescript-eslint/parser\": \"^8.0.0\",\n \"@vitest/coverage-v8\": \"^2.1.9\",\n \"eslint\": \"^9.0.0\",\n \"eslint-config-prettier\": \"^9.1.0\",\n \"husky\": \"^9.1.7\",\n \"lint-staged\": \"^16.4.0\",\n \"prettier\": \"^3.3.0\",\n \"tsup\": \"^8.0.0\",\n \"typescript\": \"^5.5.0\",\n \"typescript-eslint\": \"^8.65.0\",\n \"vitest\": \"^2.0.0\"\n },\n \"optionalDependencies\": {\n \"@napi-rs/keyring\": \"^1.3.0\"\n },\n \"overrides\": {\n \"ws\": \"^8.21.0\"\n }\n}\n"],"mappings":";;;AACA,SAAS,eAAe;AACxB,SAAS,YAAY;;;ACFrB;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,eAAiB;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B,SAAS,oBAAoB,SAAiB,aAA8C;AACjG,MAAI,gBAAgB,oBAAqB,QAAO;AAChD,MAAI,gBAAgB,iBAAkB,QAAO;AAC7C,MAAI,gBAAgB,iBAAkB,QAAO;AAG7C,QAAM,QAAQ,QAAQ,YAAY;AAClC,MAAI,MAAM,WAAW,SAAS,EAAG,QAAO;AACxC,MAAI,MAAM,WAAW,MAAM,EAAG,QAAO;AACrC,MAAI,MAAM,WAAW,SAAS,EAAG,QAAO;AAExC,SAAO;AACT;AAEO,IAAM,UAAU,gBAAI;","names":[]}
|
|
@@ -5,16 +5,9 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __esm = (fn, res) => function __init() {
|
|
9
|
-
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
10
|
-
};
|
|
11
8
|
var __commonJS = (cb, mod) => function __require() {
|
|
12
9
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
13
10
|
};
|
|
14
|
-
var __export = (target, all) => {
|
|
15
|
-
for (var name in all)
|
|
16
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
-
};
|
|
18
11
|
var __copyProps = (to, from, except, desc) => {
|
|
19
12
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
13
|
for (let key of __getOwnPropNames(from))
|
|
@@ -31,13 +24,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
31
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
32
25
|
mod
|
|
33
26
|
));
|
|
34
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
27
|
|
|
36
28
|
export {
|
|
37
|
-
__esm,
|
|
38
29
|
__commonJS,
|
|
39
|
-
|
|
40
|
-
__toESM,
|
|
41
|
-
__toCommonJS
|
|
30
|
+
__toESM
|
|
42
31
|
};
|
|
43
|
-
//# sourceMappingURL=chunk-
|
|
32
|
+
//# sourceMappingURL=chunk-UT3JLF3M.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
__commonJS,
|
|
4
4
|
__toESM
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-UT3JLF3M.js";
|
|
6
6
|
|
|
7
7
|
// node_modules/glob/node_modules/balanced-match/index.js
|
|
8
8
|
var require_balanced_match = __commonJS({
|
|
@@ -6830,6 +6830,7 @@ function toProviderTemplate(data) {
|
|
|
6830
6830
|
defaultBaseUrl: data.apiBaseUrl,
|
|
6831
6831
|
modelsPath: data.modelsPath ?? data.modelsEndpoint,
|
|
6832
6832
|
signupUrl: data.signupUrl,
|
|
6833
|
+
signupNote: data.signupNote,
|
|
6833
6834
|
modelSource: data.modelSource ?? "api-list",
|
|
6834
6835
|
staticModels: data.staticModels,
|
|
6835
6836
|
supported: data.supported,
|
|
@@ -6861,6 +6862,7 @@ var NPM_PACKAGES = {
|
|
|
6861
6862
|
google: "@ai-sdk/google",
|
|
6862
6863
|
alibaba: "@ai-sdk/alibaba",
|
|
6863
6864
|
openrouter: "@openrouter/ai-sdk-provider",
|
|
6865
|
+
agentrouter: "@ai-sdk/anthropic",
|
|
6864
6866
|
kilo: "@ai-sdk/openai-compatible",
|
|
6865
6867
|
ollama: "@ai-sdk/openai-compatible",
|
|
6866
6868
|
lmstudio: "@ai-sdk/openai-compatible",
|
|
@@ -6887,7 +6889,9 @@ var PROVIDER_TEMPLATES = loadTemplatesSync().map(toProviderTemplate).map((t) =>
|
|
|
6887
6889
|
npm: t.npm ?? NPM_PACKAGES[t.id] ?? ""
|
|
6888
6890
|
}));
|
|
6889
6891
|
function listSupportedTemplates() {
|
|
6890
|
-
return PROVIDER_TEMPLATES.filter(
|
|
6892
|
+
return PROVIDER_TEMPLATES.filter(
|
|
6893
|
+
(t) => t.supported && t.authType === "api" && t.addable !== false && !t.hidden
|
|
6894
|
+
).sort((a, b) => a.name.localeCompare(b.name));
|
|
6891
6895
|
}
|
|
6892
6896
|
function listAddableTemplates(configuredIds = []) {
|
|
6893
6897
|
const configured = new Set(configuredIds);
|
|
@@ -6900,7 +6904,9 @@ function listAddableTemplates(configuredIds = []) {
|
|
|
6900
6904
|
}
|
|
6901
6905
|
function listVisibleOAuthTemplates(configuredIds = []) {
|
|
6902
6906
|
const configured = new Set(configuredIds);
|
|
6903
|
-
return PROVIDER_TEMPLATES.filter(
|
|
6907
|
+
return PROVIDER_TEMPLATES.filter(
|
|
6908
|
+
(t) => t.authType === "oauth" && t.supported && t.addable !== false && !t.hidden && !configured.has(t.id)
|
|
6909
|
+
).sort((a, b) => a.name.localeCompare(b.name));
|
|
6904
6910
|
}
|
|
6905
6911
|
function getTemplateById(id) {
|
|
6906
6912
|
const data = loadTemplateSync(id);
|
|
@@ -6931,4 +6937,4 @@ export {
|
|
|
6931
6937
|
getTemplateById,
|
|
6932
6938
|
filterTemplates
|
|
6933
6939
|
};
|
|
6934
|
-
//# sourceMappingURL=chunk-
|
|
6940
|
+
//# sourceMappingURL=chunk-VGM6EBG4.js.map
|