claudegate 1.0.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/LICENSE +21 -0
- package/README.md +166 -0
- package/bin/cc.js +3 -0
- package/bin/claudegate.js +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +76 -0
- package/dist/index.js.map +1 -0
- package/dist/providers/index.d.ts +2 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +2 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/providers/registry.d.ts +10 -0
- package/dist/providers/registry.d.ts.map +1 -0
- package/dist/providers/registry.js +306 -0
- package/dist/providers/registry.js.map +1 -0
- package/dist/services/config.service.d.ts +11 -0
- package/dist/services/config.service.d.ts.map +1 -0
- package/dist/services/config.service.js +33 -0
- package/dist/services/config.service.js.map +1 -0
- package/dist/services/env-builder.service.d.ts +31 -0
- package/dist/services/env-builder.service.d.ts.map +1 -0
- package/dist/services/env-builder.service.js +73 -0
- package/dist/services/env-builder.service.js.map +1 -0
- package/dist/services/launcher.service.d.ts +7 -0
- package/dist/services/launcher.service.d.ts.map +1 -0
- package/dist/services/launcher.service.js +37 -0
- package/dist/services/launcher.service.js.map +1 -0
- package/dist/services/model.service.d.ts +46 -0
- package/dist/services/model.service.d.ts.map +1 -0
- package/dist/services/model.service.js +164 -0
- package/dist/services/model.service.js.map +1 -0
- package/dist/services/profile.service.d.ts +38 -0
- package/dist/services/profile.service.d.ts.map +1 -0
- package/dist/services/profile.service.js +107 -0
- package/dist/services/profile.service.js.map +1 -0
- package/dist/types/config.d.ts +42 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +32 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +4 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/profile.d.ts +29 -0
- package/dist/types/profile.d.ts.map +1 -0
- package/dist/types/profile.js +2 -0
- package/dist/types/profile.js.map +1 -0
- package/dist/types/provider.d.ts +64 -0
- package/dist/types/provider.d.ts.map +1 -0
- package/dist/types/provider.js +24 -0
- package/dist/types/provider.js.map +1 -0
- package/dist/ui/add-profile.d.ts +7 -0
- package/dist/ui/add-profile.d.ts.map +1 -0
- package/dist/ui/add-profile.js +67 -0
- package/dist/ui/add-profile.js.map +1 -0
- package/dist/ui/components/banner.d.ts +5 -0
- package/dist/ui/components/banner.d.ts.map +1 -0
- package/dist/ui/components/banner.js +14 -0
- package/dist/ui/components/banner.js.map +1 -0
- package/dist/ui/components/status.d.ts +6 -0
- package/dist/ui/components/status.d.ts.map +1 -0
- package/dist/ui/components/status.js +17 -0
- package/dist/ui/components/status.js.map +1 -0
- package/dist/ui/manage-profiles.d.ts +6 -0
- package/dist/ui/manage-profiles.d.ts.map +1 -0
- package/dist/ui/manage-profiles.js +197 -0
- package/dist/ui/manage-profiles.js.map +1 -0
- package/dist/ui/model-selector.d.ts +19 -0
- package/dist/ui/model-selector.d.ts.map +1 -0
- package/dist/ui/model-selector.js +127 -0
- package/dist/ui/model-selector.js.map +1 -0
- package/dist/ui/profile-form.d.ts +10 -0
- package/dist/ui/profile-form.d.ts.map +1 -0
- package/dist/ui/profile-form.js +61 -0
- package/dist/ui/profile-form.js.map +1 -0
- package/dist/ui/profile-selector.d.ts +27 -0
- package/dist/ui/profile-selector.d.ts.map +1 -0
- package/dist/ui/profile-selector.js +129 -0
- package/dist/ui/profile-selector.js.map +1 -0
- package/dist/utils/logger.d.ts +7 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +8 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/paths.d.ts +10 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +21 -0
- package/dist/utils/paths.js.map +1 -0
- package/package.json +109 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 ClaudeGate Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# ClaudeGate
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/claudegate)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
[](https://github.com/Naresh084/claudegate/actions/workflows/ci.yml)
|
|
6
|
+
|
|
7
|
+
> A terminal utility that acts as a gateway for Claude CLI, enabling seamless switching between AI providers without modifying your Claude configuration.
|
|
8
|
+
|
|
9
|
+
## Why ClaudeGate?
|
|
10
|
+
|
|
11
|
+
Claude CLI is powerful, but switching between different AI providers (Anthropic, OpenRouter, Z.AI, etc.) requires manually setting environment variables or editing config files. **ClaudeGate** solves this by providing:
|
|
12
|
+
|
|
13
|
+
- **One-click provider switching** - Interactive menu to select your AI backend
|
|
14
|
+
- **Profile management** - Save multiple configurations for different use cases
|
|
15
|
+
- **Zero config pollution** - Never modifies your `~/.claude/settings.json`
|
|
16
|
+
- **Full CLI passthrough** - All Claude arguments work exactly as expected
|
|
17
|
+
|
|
18
|
+
## Supported Providers
|
|
19
|
+
|
|
20
|
+
| Provider | Description |
|
|
21
|
+
|----------|-------------|
|
|
22
|
+
| **Anthropic (Native)** | Use your existing Claude CLI configuration |
|
|
23
|
+
| **Z.AI (GLM Models)** | Cost-effective alternative using GLM-4.7 models |
|
|
24
|
+
| **OpenRouter** | Access 320+ models through a single API |
|
|
25
|
+
| **Kimi K2 (Moonshot AI)** | Up to 90% cost savings with Kimi K2 models |
|
|
26
|
+
| **Novita AI** | Novita AI provider support |
|
|
27
|
+
| **Custom / Self-hosted** | LiteLLM, Hugging Face TGI, or any compatible endpoint |
|
|
28
|
+
|
|
29
|
+
## Installation
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install -g claudegate
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Quick Start
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Launch ClaudeGate - shows profile selector, then starts Claude
|
|
39
|
+
claudegate
|
|
40
|
+
|
|
41
|
+
# Or use the short alias
|
|
42
|
+
cc
|
|
43
|
+
|
|
44
|
+
# All Claude CLI arguments work as expected
|
|
45
|
+
claudegate -p "explain this code"
|
|
46
|
+
claudegate --resume
|
|
47
|
+
cc -p "help me debug this"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## How It Works
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
54
|
+
│ CLAUDEGATE │
|
|
55
|
+
└─────────────────────────────────────────────────────────────┘
|
|
56
|
+
|
|
57
|
+
? Select active profile:
|
|
58
|
+
❯ ● work-anthropic (Anthropic) [current]
|
|
59
|
+
zai-dev (Z.AI - GLM Models)
|
|
60
|
+
openrouter-gpt4 (OpenRouter)
|
|
61
|
+
kimi-k2 (Kimi K2 - Moonshot AI)
|
|
62
|
+
─────────────────────────────────────
|
|
63
|
+
+ Add new profile
|
|
64
|
+
⚙ Manage profiles
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
1. **Select Profile** - Choose which AI provider to use
|
|
68
|
+
2. **Launch Claude** - Claude CLI starts with the correct environment
|
|
69
|
+
3. **Work normally** - All your usual Claude workflows just work
|
|
70
|
+
|
|
71
|
+
## Profile Management
|
|
72
|
+
|
|
73
|
+
### Adding a Profile
|
|
74
|
+
|
|
75
|
+
Select **"+ Add new profile"** from the menu:
|
|
76
|
+
|
|
77
|
+
1. Choose a provider (Anthropic, Z.AI, OpenRouter, etc.)
|
|
78
|
+
2. Enter a profile name (e.g., "work-openrouter")
|
|
79
|
+
3. Enter required credentials (API keys, endpoints)
|
|
80
|
+
4. Profile is saved and ready to use
|
|
81
|
+
|
|
82
|
+
### Managing Profiles
|
|
83
|
+
|
|
84
|
+
Select **"⚙ Manage profiles"** to:
|
|
85
|
+
|
|
86
|
+
- **Edit** - Update profile name or credentials
|
|
87
|
+
- **Delete** - Remove a profile
|
|
88
|
+
- **Test** - Verify your configuration works
|
|
89
|
+
|
|
90
|
+
## Configuration
|
|
91
|
+
|
|
92
|
+
Profiles are stored in `~/.claudegate/config.json`:
|
|
93
|
+
|
|
94
|
+
```json
|
|
95
|
+
{
|
|
96
|
+
"version": "1.0.0",
|
|
97
|
+
"activeProfileId": "abc-123",
|
|
98
|
+
"profiles": [
|
|
99
|
+
{
|
|
100
|
+
"id": "abc-123",
|
|
101
|
+
"name": "work-anthropic",
|
|
102
|
+
"providerId": "anthropic",
|
|
103
|
+
"envVars": {}
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"id": "def-456",
|
|
107
|
+
"name": "zai-dev",
|
|
108
|
+
"providerId": "zai",
|
|
109
|
+
"envVars": {
|
|
110
|
+
"ANTHROPIC_AUTH_TOKEN": "your-api-key",
|
|
111
|
+
"ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Prerequisites
|
|
119
|
+
|
|
120
|
+
- **Node.js** >= 18.0.0
|
|
121
|
+
- **[Claude CLI](https://docs.anthropic.com/en/docs/claude-code)** installed and configured
|
|
122
|
+
- API keys for your desired providers
|
|
123
|
+
|
|
124
|
+
## Security
|
|
125
|
+
|
|
126
|
+
- Config stored with `0600` permissions (owner read/write only)
|
|
127
|
+
- API keys stored locally, never transmitted except to configured providers
|
|
128
|
+
- Sensitive values masked during input
|
|
129
|
+
|
|
130
|
+
## Troubleshooting
|
|
131
|
+
|
|
132
|
+
### Claude CLI not found
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
which claude # Should show Claude CLI path
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
If not found, install Claude CLI first.
|
|
139
|
+
|
|
140
|
+
### Permission denied
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
chmod 700 ~/.claudegate
|
|
144
|
+
chmod 600 ~/.claudegate/config.json
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Provider connection issues
|
|
148
|
+
|
|
149
|
+
Use the **"Test"** option in profile management to verify credentials.
|
|
150
|
+
|
|
151
|
+
## Uninstall
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
npm uninstall -g claudegate
|
|
155
|
+
rm -rf ~/.claudegate
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Contributing
|
|
159
|
+
|
|
160
|
+
Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
161
|
+
|
|
162
|
+
This project uses [Conventional Commits](https://www.conventionalcommits.org/) for automatic versioning.
|
|
163
|
+
|
|
164
|
+
## License
|
|
165
|
+
|
|
166
|
+
[MIT](LICENSE)
|
package/bin/cc.js
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { showProfileSelector } from './ui/profile-selector.js';
|
|
3
|
+
import { launchClaude } from './services/launcher.service.js';
|
|
4
|
+
import { buildEnvVars } from './services/env-builder.service.js';
|
|
5
|
+
import { getProviderById } from './providers/index.js';
|
|
6
|
+
import { showDivider, showInfo } from './ui/components/status.js';
|
|
7
|
+
/**
|
|
8
|
+
* Main entry point for ClaudeGate
|
|
9
|
+
*
|
|
10
|
+
* Flow:
|
|
11
|
+
* 1. Store all command line args (will pass to Claude)
|
|
12
|
+
* 2. Show profile selector (ALWAYS)
|
|
13
|
+
* 3. User selects profile (or adds/manages)
|
|
14
|
+
* 4. Build env vars from selected profile
|
|
15
|
+
* 5. Spawn Claude with stored args
|
|
16
|
+
*/
|
|
17
|
+
async function main() {
|
|
18
|
+
// 1. Store all args to pass to Claude
|
|
19
|
+
const args = process.argv.slice(2);
|
|
20
|
+
try {
|
|
21
|
+
// 2. Show profile selector (ALWAYS)
|
|
22
|
+
const profile = await showProfileSelector();
|
|
23
|
+
if (!profile) {
|
|
24
|
+
// User exited without selecting a profile
|
|
25
|
+
process.exit(0);
|
|
26
|
+
}
|
|
27
|
+
// 3. Show what's being configured
|
|
28
|
+
const provider = getProviderById(profile.providerId);
|
|
29
|
+
const envVars = buildEnvVars(profile);
|
|
30
|
+
console.log();
|
|
31
|
+
showDivider();
|
|
32
|
+
console.log();
|
|
33
|
+
if (provider?.useExistingConfig) {
|
|
34
|
+
showInfo('Using your existing Claude CLI configuration');
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
showInfo(`Provider: ${provider?.name ?? profile.providerId}`);
|
|
38
|
+
if (envVars['ANTHROPIC_BASE_URL']) {
|
|
39
|
+
showInfo(`Endpoint: ${envVars['ANTHROPIC_BASE_URL']}`);
|
|
40
|
+
}
|
|
41
|
+
// Display selected models
|
|
42
|
+
if (profile.selectedModels) {
|
|
43
|
+
const { haiku, sonnet, opus } = profile.selectedModels;
|
|
44
|
+
if (haiku)
|
|
45
|
+
showInfo(`Haiku: ${haiku.name}`);
|
|
46
|
+
if (sonnet)
|
|
47
|
+
showInfo(`Sonnet: ${sonnet.name}`);
|
|
48
|
+
if (opus)
|
|
49
|
+
showInfo(`Opus: ${opus.name}`);
|
|
50
|
+
}
|
|
51
|
+
else if (envVars['ANTHROPIC_DEFAULT_SONNET_MODEL']) {
|
|
52
|
+
// Fallback to env var display for legacy profiles
|
|
53
|
+
showInfo(`Model: ${envVars['ANTHROPIC_DEFAULT_SONNET_MODEL']}`);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
console.log();
|
|
57
|
+
showDivider();
|
|
58
|
+
console.log();
|
|
59
|
+
// 4. Launch Claude with the selected profile and args
|
|
60
|
+
const exitCode = await launchClaude(profile, args);
|
|
61
|
+
process.exit(exitCode);
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
if (error instanceof Error) {
|
|
65
|
+
// Handle Ctrl+C gracefully
|
|
66
|
+
if (error.message.includes('User force closed')) {
|
|
67
|
+
console.log();
|
|
68
|
+
process.exit(0);
|
|
69
|
+
}
|
|
70
|
+
console.error('Error:', error.message);
|
|
71
|
+
}
|
|
72
|
+
process.exit(1);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
main();
|
|
76
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,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eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ProviderDefinition } from '../types/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Registry of all supported AI providers
|
|
4
|
+
*/
|
|
5
|
+
export declare const PROVIDERS: ProviderDefinition[];
|
|
6
|
+
/**
|
|
7
|
+
* Get a provider by its ID
|
|
8
|
+
*/
|
|
9
|
+
export declare function getProviderById(id: string): ProviderDefinition | undefined;
|
|
10
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/providers/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,kBAAkB,EAuSzC,CAAC;AAEF;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS,CAE1E"}
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registry of all supported AI providers
|
|
3
|
+
*/
|
|
4
|
+
export const PROVIDERS = [
|
|
5
|
+
{
|
|
6
|
+
id: 'anthropic',
|
|
7
|
+
name: 'Anthropic (Native)',
|
|
8
|
+
description: 'Use your existing Claude CLI configuration',
|
|
9
|
+
color: '#D4A574',
|
|
10
|
+
useExistingConfig: true,
|
|
11
|
+
envVars: [],
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
id: 'zai',
|
|
15
|
+
name: 'Z.AI (GLM Models)',
|
|
16
|
+
description: 'Cheaper alternative using GLM-4.7 models',
|
|
17
|
+
color: '#4A90D9',
|
|
18
|
+
envVars: [
|
|
19
|
+
{
|
|
20
|
+
name: 'ANTHROPIC_AUTH_TOKEN',
|
|
21
|
+
label: 'Z.AI API Key',
|
|
22
|
+
description: 'Your Z.AI authentication token from z.ai/manage-apikey',
|
|
23
|
+
type: 'apiKey',
|
|
24
|
+
sensitive: true,
|
|
25
|
+
required: true,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'ANTHROPIC_BASE_URL',
|
|
29
|
+
label: 'Base URL',
|
|
30
|
+
description: 'Z.AI API endpoint',
|
|
31
|
+
type: 'url',
|
|
32
|
+
sensitive: false,
|
|
33
|
+
default: 'https://api.z.ai/api/anthropic',
|
|
34
|
+
required: true,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: 'API_TIMEOUT_MS',
|
|
38
|
+
label: 'Timeout (ms)',
|
|
39
|
+
description: 'API request timeout in milliseconds',
|
|
40
|
+
type: 'number',
|
|
41
|
+
sensitive: false,
|
|
42
|
+
default: 3000000,
|
|
43
|
+
required: false,
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
modelFetching: {
|
|
47
|
+
supported: true,
|
|
48
|
+
endpoint: 'https://api.z.ai/api/paas/v4/models',
|
|
49
|
+
authKeyEnvVar: 'ANTHROPIC_AUTH_TOKEN',
|
|
50
|
+
},
|
|
51
|
+
fallbackModels: [
|
|
52
|
+
{ id: 'glm-4.7', name: 'GLM-4.7', tier: 'opus' },
|
|
53
|
+
{ id: 'glm-4.6', name: 'GLM-4.6', tier: 'sonnet' },
|
|
54
|
+
{ id: 'glm-4.5-air', name: 'GLM-4.5 Air (fast)', tier: 'haiku' },
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
id: 'openrouter',
|
|
59
|
+
name: 'OpenRouter',
|
|
60
|
+
description: 'Access 320+ models through OpenRouter',
|
|
61
|
+
color: '#6366F1',
|
|
62
|
+
envVars: [
|
|
63
|
+
{
|
|
64
|
+
name: 'OPENROUTER_API_KEY',
|
|
65
|
+
label: 'OpenRouter API Key',
|
|
66
|
+
description: 'Your OpenRouter API key',
|
|
67
|
+
type: 'apiKey',
|
|
68
|
+
sensitive: true,
|
|
69
|
+
required: true,
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: 'ANTHROPIC_API_KEY',
|
|
73
|
+
label: 'Anthropic Key Override',
|
|
74
|
+
description: 'Must be empty for OpenRouter to work',
|
|
75
|
+
type: 'string',
|
|
76
|
+
sensitive: false,
|
|
77
|
+
default: '',
|
|
78
|
+
required: true,
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: 'ANTHROPIC_BASE_URL',
|
|
82
|
+
label: 'Base URL',
|
|
83
|
+
description: 'OpenRouter API endpoint',
|
|
84
|
+
type: 'url',
|
|
85
|
+
sensitive: false,
|
|
86
|
+
default: 'https://openrouter.ai/api',
|
|
87
|
+
required: true,
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
modelFetching: {
|
|
91
|
+
supported: true,
|
|
92
|
+
endpoint: 'https://openrouter.ai/api/v1/models',
|
|
93
|
+
authKeyEnvVar: 'OPENROUTER_API_KEY',
|
|
94
|
+
},
|
|
95
|
+
fallbackModels: [
|
|
96
|
+
{ id: 'anthropic/claude-sonnet-4', name: 'Claude Sonnet 4', tier: 'opus' },
|
|
97
|
+
{ id: 'anthropic/claude-3.5-sonnet', name: 'Claude 3.5 Sonnet', tier: 'sonnet' },
|
|
98
|
+
{ id: 'anthropic/claude-3-haiku', name: 'Claude 3 Haiku', tier: 'haiku' },
|
|
99
|
+
],
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
id: 'moonshot',
|
|
103
|
+
name: 'Kimi K2 (Moonshot AI)',
|
|
104
|
+
description: '90% cheaper - Moonshot AI Kimi K2 models',
|
|
105
|
+
color: '#10B981',
|
|
106
|
+
envVars: [
|
|
107
|
+
{
|
|
108
|
+
name: 'ANTHROPIC_AUTH_TOKEN',
|
|
109
|
+
label: 'Moonshot API Key',
|
|
110
|
+
description: 'Your Moonshot AI API key from platform.moonshot.ai',
|
|
111
|
+
type: 'apiKey',
|
|
112
|
+
sensitive: true,
|
|
113
|
+
required: true,
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: 'ANTHROPIC_BASE_URL',
|
|
117
|
+
label: 'Base URL',
|
|
118
|
+
description: 'Moonshot API endpoint',
|
|
119
|
+
type: 'url',
|
|
120
|
+
sensitive: false,
|
|
121
|
+
default: 'https://api.moonshot.ai/anthropic',
|
|
122
|
+
required: true,
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
modelFetching: {
|
|
126
|
+
supported: true,
|
|
127
|
+
endpoint: 'https://api.moonshot.ai/v1/models',
|
|
128
|
+
authKeyEnvVar: 'ANTHROPIC_AUTH_TOKEN',
|
|
129
|
+
},
|
|
130
|
+
fallbackModels: [
|
|
131
|
+
{ id: 'kimi-k2-0711-preview', name: 'Kimi K2', tier: 'opus' },
|
|
132
|
+
{ id: 'kimi-k2-0711-preview', name: 'Kimi K2', tier: 'sonnet' },
|
|
133
|
+
{ id: 'kimi-k2-0711-preview', name: 'Kimi K2', tier: 'haiku' },
|
|
134
|
+
],
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
id: 'novita',
|
|
138
|
+
name: 'Novita AI',
|
|
139
|
+
description: 'Novita AI provider',
|
|
140
|
+
color: '#F59E0B',
|
|
141
|
+
envVars: [
|
|
142
|
+
{
|
|
143
|
+
name: 'ANTHROPIC_AUTH_TOKEN',
|
|
144
|
+
label: 'Novita API Key',
|
|
145
|
+
description: 'Your Novita AI API key',
|
|
146
|
+
type: 'apiKey',
|
|
147
|
+
sensitive: true,
|
|
148
|
+
required: true,
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
name: 'ANTHROPIC_BASE_URL',
|
|
152
|
+
label: 'Base URL',
|
|
153
|
+
description: 'Novita API endpoint',
|
|
154
|
+
type: 'url',
|
|
155
|
+
sensitive: false,
|
|
156
|
+
default: 'https://api.novita.ai/anthropic',
|
|
157
|
+
required: true,
|
|
158
|
+
},
|
|
159
|
+
],
|
|
160
|
+
modelFetching: {
|
|
161
|
+
supported: true,
|
|
162
|
+
endpoint: 'https://api.novita.ai/v3/openai/models',
|
|
163
|
+
authKeyEnvVar: 'ANTHROPIC_AUTH_TOKEN',
|
|
164
|
+
},
|
|
165
|
+
fallbackModels: [
|
|
166
|
+
{ id: 'claude-3-5-sonnet', name: 'Claude 3.5 Sonnet', tier: 'opus' },
|
|
167
|
+
{ id: 'claude-3-5-sonnet', name: 'Claude 3.5 Sonnet', tier: 'sonnet' },
|
|
168
|
+
{ id: 'claude-3-haiku', name: 'Claude 3 Haiku', tier: 'haiku' },
|
|
169
|
+
],
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
id: 'minimax',
|
|
173
|
+
name: 'MiniMax (M2 Models)',
|
|
174
|
+
description: 'Agent-native M2/M2.1 models for coding workflows',
|
|
175
|
+
color: '#FF6B35',
|
|
176
|
+
envVars: [
|
|
177
|
+
{
|
|
178
|
+
name: 'ANTHROPIC_AUTH_TOKEN',
|
|
179
|
+
label: 'MiniMax API Key',
|
|
180
|
+
description: 'Your MiniMax API key from platform.minimax.io',
|
|
181
|
+
type: 'apiKey',
|
|
182
|
+
sensitive: true,
|
|
183
|
+
required: true,
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
name: 'ANTHROPIC_BASE_URL',
|
|
187
|
+
label: 'Base URL',
|
|
188
|
+
description: 'MiniMax Anthropic-compatible endpoint',
|
|
189
|
+
type: 'url',
|
|
190
|
+
sensitive: false,
|
|
191
|
+
default: 'https://api.minimax.io/anthropic',
|
|
192
|
+
required: true,
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
name: 'API_TIMEOUT_MS',
|
|
196
|
+
label: 'Timeout (ms)',
|
|
197
|
+
description: 'API request timeout in milliseconds',
|
|
198
|
+
type: 'number',
|
|
199
|
+
sensitive: false,
|
|
200
|
+
default: 3000000,
|
|
201
|
+
required: false,
|
|
202
|
+
},
|
|
203
|
+
],
|
|
204
|
+
modelFetching: {
|
|
205
|
+
supported: true,
|
|
206
|
+
endpoint: 'https://api.minimax.io/v1/models',
|
|
207
|
+
authKeyEnvVar: 'ANTHROPIC_AUTH_TOKEN',
|
|
208
|
+
},
|
|
209
|
+
fallbackModels: [
|
|
210
|
+
{ id: 'MiniMax-M2.1', name: 'MiniMax M2.1 (230B, code optimized)', tier: 'opus' },
|
|
211
|
+
{ id: 'MiniMax-M2.1', name: 'MiniMax M2.1 (230B, code optimized)', tier: 'sonnet' },
|
|
212
|
+
{ id: 'MiniMax-M2', name: 'MiniMax M2 (200k context, agentic)', tier: 'haiku' },
|
|
213
|
+
],
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
id: 'deepseek',
|
|
217
|
+
name: 'DeepSeek (V3 Models)',
|
|
218
|
+
description: 'Cost-effective 128K context models with reasoning',
|
|
219
|
+
color: '#1A73E8',
|
|
220
|
+
envVars: [
|
|
221
|
+
{
|
|
222
|
+
name: 'ANTHROPIC_AUTH_TOKEN',
|
|
223
|
+
label: 'DeepSeek API Key',
|
|
224
|
+
description: 'Your DeepSeek API key from platform.deepseek.com',
|
|
225
|
+
type: 'apiKey',
|
|
226
|
+
sensitive: true,
|
|
227
|
+
required: true,
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
name: 'ANTHROPIC_BASE_URL',
|
|
231
|
+
label: 'Base URL',
|
|
232
|
+
description: 'DeepSeek API endpoint',
|
|
233
|
+
type: 'url',
|
|
234
|
+
sensitive: false,
|
|
235
|
+
default: 'https://api.deepseek.com',
|
|
236
|
+
required: true,
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
name: 'API_TIMEOUT_MS',
|
|
240
|
+
label: 'Timeout (ms)',
|
|
241
|
+
description: 'API request timeout in milliseconds',
|
|
242
|
+
type: 'number',
|
|
243
|
+
sensitive: false,
|
|
244
|
+
default: 3000000,
|
|
245
|
+
required: false,
|
|
246
|
+
},
|
|
247
|
+
],
|
|
248
|
+
modelFetching: {
|
|
249
|
+
supported: true,
|
|
250
|
+
endpoint: 'https://api.deepseek.com/models',
|
|
251
|
+
authKeyEnvVar: 'ANTHROPIC_AUTH_TOKEN',
|
|
252
|
+
},
|
|
253
|
+
fallbackModels: [
|
|
254
|
+
{ id: 'deepseek-reasoner', name: 'DeepSeek Reasoner (thinking mode)', tier: 'opus' },
|
|
255
|
+
{ id: 'deepseek-chat', name: 'DeepSeek Chat V3', tier: 'sonnet' },
|
|
256
|
+
{ id: 'deepseek-chat', name: 'DeepSeek Chat V3', tier: 'haiku' },
|
|
257
|
+
],
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
id: 'custom',
|
|
261
|
+
name: 'Custom / Self-hosted',
|
|
262
|
+
description: 'LiteLLM, Hugging Face TGI, or other compatible endpoints',
|
|
263
|
+
color: '#8B5CF6',
|
|
264
|
+
envVars: [
|
|
265
|
+
{
|
|
266
|
+
name: 'ANTHROPIC_BASE_URL',
|
|
267
|
+
label: 'Base URL',
|
|
268
|
+
description: 'Your custom API endpoint URL',
|
|
269
|
+
type: 'url',
|
|
270
|
+
sensitive: false,
|
|
271
|
+
required: true,
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
name: 'ANTHROPIC_AUTH_TOKEN',
|
|
275
|
+
label: 'Auth Token',
|
|
276
|
+
description: 'Authentication token (if required)',
|
|
277
|
+
type: 'apiKey',
|
|
278
|
+
sensitive: true,
|
|
279
|
+
required: false,
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
name: 'ANTHROPIC_API_KEY',
|
|
283
|
+
label: 'API Key',
|
|
284
|
+
description: 'API key (if required instead of token)',
|
|
285
|
+
type: 'apiKey',
|
|
286
|
+
sensitive: true,
|
|
287
|
+
required: false,
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
name: 'ANTHROPIC_MODEL',
|
|
291
|
+
label: 'Model',
|
|
292
|
+
description: 'Model identifier (optional)',
|
|
293
|
+
type: 'string',
|
|
294
|
+
sensitive: false,
|
|
295
|
+
required: false,
|
|
296
|
+
},
|
|
297
|
+
],
|
|
298
|
+
},
|
|
299
|
+
];
|
|
300
|
+
/**
|
|
301
|
+
* Get a provider by its ID
|
|
302
|
+
*/
|
|
303
|
+
export function getProviderById(id) {
|
|
304
|
+
return PROVIDERS.find((p) => p.id === id);
|
|
305
|
+
}
|
|
306
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/providers/registry.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAyB;IAC7C;QACE,EAAE,EAAE,WAAW;QACf,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,4CAA4C;QACzD,KAAK,EAAE,SAAS;QAChB,iBAAiB,EAAE,IAAI;QACvB,OAAO,EAAE,EAAE;KACZ;IACD;QACE,EAAE,EAAE,KAAK;QACT,IAAI,EAAE,mBAAmB;QACzB,WAAW,EAAE,0CAA0C;QACvD,KAAK,EAAE,SAAS;QAChB,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,sBAAsB;gBAC5B,KAAK,EAAE,cAAc;gBACrB,WAAW,EAAE,wDAAwD;gBACrE,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,IAAI;gBACf,QAAQ,EAAE,IAAI;aACf;YACD;gBACE,IAAI,EAAE,oBAAoB;gBAC1B,KAAK,EAAE,UAAU;gBACjB,WAAW,EAAE,mBAAmB;gBAChC,IAAI,EAAE,KAAK;gBACX,SAAS,EAAE,KAAK;gBAChB,OAAO,EAAE,gCAAgC;gBACzC,QAAQ,EAAE,IAAI;aACf;YACD;gBACE,IAAI,EAAE,gBAAgB;gBACtB,KAAK,EAAE,cAAc;gBACrB,WAAW,EAAE,qCAAqC;gBAClD,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,KAAK;gBAChB,OAAO,EAAE,OAAO;gBA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,KAAK;gBAChB,QAAQ,EAAE,KAAK;aAChB;SACF;KACF;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,EAAU;IACxC,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AppConfig } from '../types/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Load the application configuration from disk
|
|
4
|
+
* Returns default config if file doesn't exist
|
|
5
|
+
*/
|
|
6
|
+
export declare function loadConfig(): AppConfig;
|
|
7
|
+
/**
|
|
8
|
+
* Save the application configuration to disk
|
|
9
|
+
*/
|
|
10
|
+
export declare function saveConfig(config: AppConfig): void;
|
|
11
|
+
//# sourceMappingURL=config.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.service.d.ts","sourceRoot":"","sources":["../../src/services/config.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAkB,MAAM,mBAAmB,CAAC;AAE9D;;;GAGG;AACH,wBAAgB,UAAU,IAAI,SAAS,CActC;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAQlD"}
|