@jacobbd/relay-ai 0.2.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/package.json ADDED
@@ -0,0 +1,79 @@
1
+ {
2
+ "name": "@jacobbd/relay-ai",
3
+ "version": "0.2.0",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "description": "Relay any model into any coding agent — launch Claude Code, Codex, and more with multi-provider gateways",
8
+ "author": "jacob-bd",
9
+ "license": "MIT",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/jacob-bd/relay-ai.git"
13
+ },
14
+ "homepage": "https://github.com/jacob-bd/relay-ai#readme",
15
+ "keywords": [
16
+ "claude",
17
+ "claude-code",
18
+ "codex",
19
+ "ai",
20
+ "llm",
21
+ "cli",
22
+ "gateway",
23
+ "relay",
24
+ "vertex"
25
+ ],
26
+ "type": "module",
27
+ "bin": {
28
+ "relay-ai": "dist/cli.js"
29
+ },
30
+ "engines": {
31
+ "node": ">=18"
32
+ },
33
+ "scripts": {
34
+ "build": "tsup",
35
+ "dev": "tsup --watch",
36
+ "test": "vitest run",
37
+ "test:watch": "vitest",
38
+ "typecheck": "tsc --noEmit",
39
+ "refresh:models-dev": "node scripts/refresh-models-dev-cache.mjs",
40
+ "prepublishOnly": "npm run build"
41
+ },
42
+ "dependencies": {
43
+ "@ai-sdk/alibaba": "^1.0.26",
44
+ "@ai-sdk/amazon-bedrock": "^4.0.113",
45
+ "@ai-sdk/azure": "^3.0.70",
46
+ "@ai-sdk/cerebras": "^2.0.54",
47
+ "@ai-sdk/cohere": "^3.0.36",
48
+ "@ai-sdk/deepinfra": "^2.0.52",
49
+ "@ai-sdk/gateway": "^3.0.125",
50
+ "@ai-sdk/google": "^3.0.80",
51
+ "@ai-sdk/google-vertex": "^4.0.142",
52
+ "@ai-sdk/groq": "^3.0.39",
53
+ "@ai-sdk/mistral": "^3.0.37",
54
+ "@ai-sdk/openai": "^3.0.68",
55
+ "@ai-sdk/openai-compatible": "^2.0.48",
56
+ "@ai-sdk/perplexity": "^3.0.33",
57
+ "@ai-sdk/togetherai": "^2.0.53",
58
+ "@ai-sdk/vercel": "^2.0.50",
59
+ "@ai-sdk/xai": "^3.0.93",
60
+ "@clack/prompts": "^0.9.1",
61
+ "@openrouter/ai-sdk-provider": "^2.9.0",
62
+ "ai": "^6.0.197",
63
+ "gitlab-ai-provider": "^6.8.0",
64
+ "ipaddr.js": "^2.4.0",
65
+ "picocolors": "^1.1.1",
66
+ "smol-toml": "^1.3.1",
67
+ "venice-ai-sdk-provider": "^1.1.19",
68
+ "zod": "^3.25.76"
69
+ },
70
+ "devDependencies": {
71
+ "@types/node": "^22.0.0",
72
+ "tsup": "^8.0.0",
73
+ "typescript": "^5.5.0",
74
+ "vitest": "^2.0.0"
75
+ },
76
+ "optionalDependencies": {
77
+ "@napi-rs/keyring": "^1.3.0"
78
+ }
79
+ }
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env node
2
+ // Regenerate src/data/models-dev-cache.json from models.dev (maintainer script).
3
+ import { writeFileSync } from 'node:fs';
4
+ import { dirname, join } from 'node:path';
5
+ import { fileURLToPath } from 'node:url';
6
+
7
+ const API_URL = 'https://models.dev/api.json';
8
+ const OUT = join(dirname(fileURLToPath(import.meta.url)), '..', 'src', 'data', 'models-dev-cache.json');
9
+
10
+ const response = await fetch(API_URL, { headers: { Accept: 'application/json' } });
11
+ if (!response.ok) {
12
+ console.error(`fetch failed: HTTP ${response.status}`);
13
+ process.exit(1);
14
+ }
15
+
16
+ const data = await response.json();
17
+ if (!data || typeof data !== 'object') {
18
+ console.error('invalid JSON payload');
19
+ process.exit(1);
20
+ }
21
+
22
+ const providerCount = Object.keys(data).filter(k => !k.startsWith('_')).length;
23
+ const out = {
24
+ _relay_meta: {
25
+ schema_version: '1',
26
+ fetched_at: new Date().toISOString(),
27
+ source: API_URL,
28
+ provider_count: providerCount,
29
+ },
30
+ ...data,
31
+ };
32
+
33
+ writeFileSync(OUT, `${JSON.stringify(out)}\n`);
34
+ console.log(`Wrote ${OUT} (${providerCount} providers)`);
@@ -0,0 +1,14 @@
1
+ [
2
+ {
3
+ "id": "claude-sonnet-4-6",
4
+ "display_name": "Claude Sonnet 4.6"
5
+ },
6
+ {
7
+ "id": "claude-opus-4-6",
8
+ "display_name": "Claude Opus 4.6"
9
+ },
10
+ {
11
+ "id": "claude-haiku-4-5",
12
+ "display_name": "Claude Haiku 4.5"
13
+ }
14
+ ]