neoagent 3.3.1-beta.1 → 3.3.1-beta.3
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/README.md +6 -1
- package/docs/getting-started.md +11 -8
- package/docs/index.md +5 -3
- package/flutter_app/lib/main_settings.dart +214 -101
- package/flutter_app/lib/main_unified.dart +178 -76
- package/lib/manager.js +253 -17
- package/package.json +1 -1
- package/runtime/paths.js +2 -0
- package/server/db/database.js +6 -2
- package/server/public/.last_build_id +1 -1
- package/server/public/assets/fonts/MaterialIcons-Regular.otf +0 -0
- package/server/public/flutter_bootstrap.js +1 -1
- package/server/public/main.dart.js +56371 -56240
- package/server/services/ai/provider_definitions.js +140 -0
- package/server/services/ai/settings.js +1 -123
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const AI_PROVIDER_DEFINITIONS = Object.freeze({
|
|
4
|
+
openai: {
|
|
5
|
+
id: 'openai',
|
|
6
|
+
label: 'OpenAI',
|
|
7
|
+
description: 'Current GPT models for general work, coding, and reasoning.',
|
|
8
|
+
envKey: 'OPENAI_API_KEY',
|
|
9
|
+
authentication: 'api_key',
|
|
10
|
+
supportsApiKey: true,
|
|
11
|
+
supportsBaseUrl: true,
|
|
12
|
+
defaultEnabled: true,
|
|
13
|
+
defaultBaseUrl: ''
|
|
14
|
+
},
|
|
15
|
+
anthropic: {
|
|
16
|
+
id: 'anthropic',
|
|
17
|
+
label: 'Anthropic',
|
|
18
|
+
description: 'Claude models for long-context drafting and analytical work.',
|
|
19
|
+
envKey: 'ANTHROPIC_API_KEY',
|
|
20
|
+
authentication: 'api_key',
|
|
21
|
+
supportsApiKey: true,
|
|
22
|
+
supportsBaseUrl: true,
|
|
23
|
+
defaultEnabled: false,
|
|
24
|
+
defaultBaseUrl: ''
|
|
25
|
+
},
|
|
26
|
+
google: {
|
|
27
|
+
id: 'google',
|
|
28
|
+
label: 'Google',
|
|
29
|
+
description: 'Gemini models with large context windows and multimodal support.',
|
|
30
|
+
envKey: 'GOOGLE_AI_KEY',
|
|
31
|
+
authentication: 'api_key',
|
|
32
|
+
supportsApiKey: true,
|
|
33
|
+
supportsBaseUrl: false,
|
|
34
|
+
defaultEnabled: true,
|
|
35
|
+
defaultBaseUrl: ''
|
|
36
|
+
},
|
|
37
|
+
grok: {
|
|
38
|
+
id: 'grok',
|
|
39
|
+
label: 'xAI',
|
|
40
|
+
description: 'Grok models tuned for personality-heavy chat and reasoning.',
|
|
41
|
+
envKey: 'XAI_API_KEY',
|
|
42
|
+
authentication: 'api_key',
|
|
43
|
+
supportsApiKey: true,
|
|
44
|
+
supportsBaseUrl: true,
|
|
45
|
+
defaultEnabled: true,
|
|
46
|
+
defaultBaseUrl: 'https://api.x.ai/v1'
|
|
47
|
+
},
|
|
48
|
+
'grok-oauth': {
|
|
49
|
+
id: 'grok-oauth',
|
|
50
|
+
label: 'Grok (xAI OAuth)',
|
|
51
|
+
description: 'Grok models via xAI account. Login with `neoagent login grok-oauth`.',
|
|
52
|
+
envKey: 'GROK_OAUTH_ACCESS_TOKEN',
|
|
53
|
+
authentication: 'oauth',
|
|
54
|
+
supportsApiKey: true,
|
|
55
|
+
supportsBaseUrl: false,
|
|
56
|
+
defaultEnabled: false,
|
|
57
|
+
defaultBaseUrl: ''
|
|
58
|
+
},
|
|
59
|
+
nvidia: {
|
|
60
|
+
id: 'nvidia',
|
|
61
|
+
label: 'NVIDIA NIM',
|
|
62
|
+
description: 'NVIDIA-hosted models including free-tier Nemotron, Kimi, Llama 4, and DeepSeek. Get a key at build.nvidia.com.',
|
|
63
|
+
envKey: 'NVIDIA_API_KEY',
|
|
64
|
+
authentication: 'api_key',
|
|
65
|
+
supportsApiKey: true,
|
|
66
|
+
supportsBaseUrl: true,
|
|
67
|
+
defaultEnabled: false,
|
|
68
|
+
defaultBaseUrl: 'https://integrate.api.nvidia.com/v1'
|
|
69
|
+
},
|
|
70
|
+
minimax: {
|
|
71
|
+
id: 'minimax',
|
|
72
|
+
label: 'MiniMax Code',
|
|
73
|
+
description: 'MiniMax Coding Plan for MiniMax-M2.7 through the Anthropic-compatible endpoint.',
|
|
74
|
+
envKey: 'MINIMAX_API_KEY',
|
|
75
|
+
authentication: 'api_key',
|
|
76
|
+
supportsApiKey: true,
|
|
77
|
+
supportsBaseUrl: true,
|
|
78
|
+
defaultEnabled: false,
|
|
79
|
+
defaultBaseUrl: 'https://api.minimax.io/anthropic'
|
|
80
|
+
},
|
|
81
|
+
'github-copilot': {
|
|
82
|
+
id: 'github-copilot',
|
|
83
|
+
label: 'GitHub Copilot',
|
|
84
|
+
description: 'Use your GitHub Copilot subscription as an AI provider.',
|
|
85
|
+
envKey: 'GITHUB_COPILOT_ACCESS_TOKEN',
|
|
86
|
+
authentication: 'oauth',
|
|
87
|
+
supportsApiKey: true,
|
|
88
|
+
supportsBaseUrl: true,
|
|
89
|
+
defaultEnabled: false,
|
|
90
|
+
defaultBaseUrl: 'https://api.githubcopilot.com'
|
|
91
|
+
},
|
|
92
|
+
'openai-codex': {
|
|
93
|
+
id: 'openai-codex',
|
|
94
|
+
label: 'OpenAI Codex',
|
|
95
|
+
description: 'Use Codex models through ChatGPT Codex authentication.',
|
|
96
|
+
envKey: 'OPENAI_CODEX_ACCESS_TOKEN',
|
|
97
|
+
authentication: 'oauth',
|
|
98
|
+
supportsApiKey: true,
|
|
99
|
+
supportsBaseUrl: true,
|
|
100
|
+
defaultEnabled: false,
|
|
101
|
+
defaultBaseUrl: 'https://chatgpt.com/backend-api/codex'
|
|
102
|
+
},
|
|
103
|
+
'claude-code': {
|
|
104
|
+
id: 'claude-code',
|
|
105
|
+
label: 'Claude Code',
|
|
106
|
+
description: 'Claude models via Claude Code subscription. Login with `neoagent login claude-code`.',
|
|
107
|
+
envKey: 'CLAUDE_CODE_OAUTH_TOKEN',
|
|
108
|
+
authentication: 'oauth',
|
|
109
|
+
supportsApiKey: true,
|
|
110
|
+
supportsBaseUrl: false,
|
|
111
|
+
defaultEnabled: false,
|
|
112
|
+
defaultBaseUrl: ''
|
|
113
|
+
},
|
|
114
|
+
openrouter: {
|
|
115
|
+
id: 'openrouter',
|
|
116
|
+
label: 'OpenRouter',
|
|
117
|
+
description: 'Access 300+ models through one API, including free-tier models. Get a key at openrouter.ai.',
|
|
118
|
+
envKey: 'OPENROUTER_API_KEY',
|
|
119
|
+
authentication: 'api_key',
|
|
120
|
+
supportsApiKey: true,
|
|
121
|
+
supportsBaseUrl: true,
|
|
122
|
+
defaultEnabled: false,
|
|
123
|
+
defaultBaseUrl: 'https://openrouter.ai/api/v1'
|
|
124
|
+
},
|
|
125
|
+
ollama: {
|
|
126
|
+
id: 'ollama',
|
|
127
|
+
label: 'Ollama',
|
|
128
|
+
description: 'Local models running on your machine through an Ollama server.',
|
|
129
|
+
envKey: '',
|
|
130
|
+
authentication: 'local',
|
|
131
|
+
supportsApiKey: false,
|
|
132
|
+
supportsBaseUrl: true,
|
|
133
|
+
defaultEnabled: true,
|
|
134
|
+
defaultBaseUrl: 'http://localhost:11434'
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
module.exports = {
|
|
139
|
+
AI_PROVIDER_DEFINITIONS,
|
|
140
|
+
};
|
|
@@ -7,129 +7,7 @@ const {
|
|
|
7
7
|
resolveLiveModel,
|
|
8
8
|
resolveLiveVoice,
|
|
9
9
|
} = require('../voice/liveSettings');
|
|
10
|
-
|
|
11
|
-
const AI_PROVIDER_DEFINITIONS = Object.freeze({
|
|
12
|
-
openai: {
|
|
13
|
-
id: 'openai',
|
|
14
|
-
label: 'OpenAI',
|
|
15
|
-
description: 'Current GPT models for general work, coding, and reasoning.',
|
|
16
|
-
envKey: 'OPENAI_API_KEY',
|
|
17
|
-
supportsApiKey: true,
|
|
18
|
-
supportsBaseUrl: true,
|
|
19
|
-
defaultEnabled: true,
|
|
20
|
-
defaultBaseUrl: ''
|
|
21
|
-
},
|
|
22
|
-
anthropic: {
|
|
23
|
-
id: 'anthropic',
|
|
24
|
-
label: 'Anthropic',
|
|
25
|
-
description: 'Claude models for long-context drafting and analytical work.',
|
|
26
|
-
envKey: 'ANTHROPIC_API_KEY',
|
|
27
|
-
supportsApiKey: true,
|
|
28
|
-
supportsBaseUrl: true,
|
|
29
|
-
defaultEnabled: false,
|
|
30
|
-
defaultBaseUrl: ''
|
|
31
|
-
},
|
|
32
|
-
google: {
|
|
33
|
-
id: 'google',
|
|
34
|
-
label: 'Google',
|
|
35
|
-
description: 'Gemini models with large context windows and multimodal support.',
|
|
36
|
-
envKey: 'GOOGLE_AI_KEY',
|
|
37
|
-
supportsApiKey: true,
|
|
38
|
-
supportsBaseUrl: false,
|
|
39
|
-
defaultEnabled: true,
|
|
40
|
-
defaultBaseUrl: ''
|
|
41
|
-
},
|
|
42
|
-
grok: {
|
|
43
|
-
id: 'grok',
|
|
44
|
-
label: 'xAI',
|
|
45
|
-
description: 'Grok models tuned for personality-heavy chat and reasoning.',
|
|
46
|
-
envKey: 'XAI_API_KEY',
|
|
47
|
-
supportsApiKey: true,
|
|
48
|
-
supportsBaseUrl: true,
|
|
49
|
-
defaultEnabled: true,
|
|
50
|
-
defaultBaseUrl: 'https://api.x.ai/v1'
|
|
51
|
-
},
|
|
52
|
-
'grok-oauth': {
|
|
53
|
-
id: 'grok-oauth',
|
|
54
|
-
label: 'Grok (xAI OAuth)',
|
|
55
|
-
description: 'Grok models via xAI account. Login with `neoagent login grok-oauth`.',
|
|
56
|
-
envKey: 'GROK_OAUTH_ACCESS_TOKEN',
|
|
57
|
-
supportsApiKey: true,
|
|
58
|
-
supportsBaseUrl: false,
|
|
59
|
-
defaultEnabled: false,
|
|
60
|
-
defaultBaseUrl: ''
|
|
61
|
-
},
|
|
62
|
-
nvidia: {
|
|
63
|
-
id: 'nvidia',
|
|
64
|
-
label: 'NVIDIA NIM',
|
|
65
|
-
description: 'NVIDIA-hosted models including free-tier Nemotron, Kimi, Llama 4, and DeepSeek. Get a key at build.nvidia.com.',
|
|
66
|
-
envKey: 'NVIDIA_API_KEY',
|
|
67
|
-
supportsApiKey: true,
|
|
68
|
-
supportsBaseUrl: true,
|
|
69
|
-
defaultEnabled: false,
|
|
70
|
-
defaultBaseUrl: 'https://integrate.api.nvidia.com/v1'
|
|
71
|
-
},
|
|
72
|
-
minimax: {
|
|
73
|
-
id: 'minimax',
|
|
74
|
-
label: 'MiniMax Code',
|
|
75
|
-
description: 'MiniMax Coding Plan for MiniMax-M2.7 through the Anthropic-compatible endpoint.',
|
|
76
|
-
envKey: 'MINIMAX_API_KEY',
|
|
77
|
-
supportsApiKey: true,
|
|
78
|
-
supportsBaseUrl: true,
|
|
79
|
-
defaultEnabled: false,
|
|
80
|
-
defaultBaseUrl: 'https://api.minimax.io/anthropic'
|
|
81
|
-
},
|
|
82
|
-
'github-copilot': {
|
|
83
|
-
id: 'github-copilot',
|
|
84
|
-
label: 'GitHub Copilot',
|
|
85
|
-
description: 'Use your GitHub Copilot subscription as an AI provider.',
|
|
86
|
-
envKey: 'GITHUB_COPILOT_ACCESS_TOKEN',
|
|
87
|
-
supportsApiKey: true,
|
|
88
|
-
supportsBaseUrl: true,
|
|
89
|
-
defaultEnabled: false,
|
|
90
|
-
defaultBaseUrl: 'https://api.githubcopilot.com'
|
|
91
|
-
},
|
|
92
|
-
'openai-codex': {
|
|
93
|
-
id: 'openai-codex',
|
|
94
|
-
label: 'OpenAI Codex',
|
|
95
|
-
description: 'Use Codex models through ChatGPT Codex authentication.',
|
|
96
|
-
envKey: 'OPENAI_CODEX_ACCESS_TOKEN',
|
|
97
|
-
supportsApiKey: true,
|
|
98
|
-
supportsBaseUrl: true,
|
|
99
|
-
defaultEnabled: false,
|
|
100
|
-
defaultBaseUrl: 'https://chatgpt.com/backend-api/codex'
|
|
101
|
-
},
|
|
102
|
-
'claude-code': {
|
|
103
|
-
id: 'claude-code',
|
|
104
|
-
label: 'Claude Code',
|
|
105
|
-
description: 'Claude models via Claude Code subscription. Login with `neoagent login claude-code`.',
|
|
106
|
-
envKey: 'CLAUDE_CODE_OAUTH_TOKEN',
|
|
107
|
-
supportsApiKey: true,
|
|
108
|
-
supportsBaseUrl: false,
|
|
109
|
-
defaultEnabled: false,
|
|
110
|
-
defaultBaseUrl: ''
|
|
111
|
-
},
|
|
112
|
-
openrouter: {
|
|
113
|
-
id: 'openrouter',
|
|
114
|
-
label: 'OpenRouter',
|
|
115
|
-
description: 'Access 300+ models through one API, including free-tier models. Get a key at openrouter.ai.',
|
|
116
|
-
envKey: 'OPENROUTER_API_KEY',
|
|
117
|
-
supportsApiKey: true,
|
|
118
|
-
supportsBaseUrl: true,
|
|
119
|
-
defaultEnabled: false,
|
|
120
|
-
defaultBaseUrl: 'https://openrouter.ai/api/v1'
|
|
121
|
-
},
|
|
122
|
-
ollama: {
|
|
123
|
-
id: 'ollama',
|
|
124
|
-
label: 'Ollama',
|
|
125
|
-
description: 'Local models running on your machine through an Ollama server.',
|
|
126
|
-
envKey: '',
|
|
127
|
-
supportsApiKey: false,
|
|
128
|
-
supportsBaseUrl: true,
|
|
129
|
-
defaultEnabled: true,
|
|
130
|
-
defaultBaseUrl: 'http://localhost:11434'
|
|
131
|
-
}
|
|
132
|
-
});
|
|
10
|
+
const { AI_PROVIDER_DEFINITIONS } = require('./provider_definitions');
|
|
133
11
|
|
|
134
12
|
function createDefaultProviderConfigs() {
|
|
135
13
|
return Object.fromEntries(
|