Skip to content

Commit 59834dc

Browse files
committed
feat: remove modelProvider and modelName - instant decrepation
1 parent 00d16da commit 59834dc

File tree

8 files changed

+31
-84
lines changed

8 files changed

+31
-84
lines changed

packages/agent/src/core/toolAgent/config.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,25 @@ export type ModelProvider =
2020
*/
2121
export function getModel(
2222
provider: ModelProvider,
23-
modelName: string,
23+
model: string,
2424
options?: { ollamaBaseUrl?: string },
2525
): LLMProvider {
2626
switch (provider) {
2727
case 'anthropic':
28-
return createProvider('anthropic', modelName);
28+
return createProvider('anthropic', model);
2929
case 'openai':
30-
return createProvider('openai', modelName);
30+
return createProvider('openai', model);
3131
case 'ollama':
3232
if (options?.ollamaBaseUrl) {
33-
return createProvider('ollama', modelName, {
33+
return createProvider('ollama', model, {
3434
baseUrl: options.ollamaBaseUrl,
3535
});
3636
}
37-
return createProvider('ollama', modelName);
37+
return createProvider('ollama', model);
3838
case 'xai':
39-
return createProvider('xai', modelName);
39+
return createProvider('xai', model);
4040
case 'mistral':
41-
return createProvider('mistral', modelName);
41+
return createProvider('mistral', model);
4242
default:
4343
throw new Error(`Unknown model provider: ${provider}`);
4444
}

packages/cli/README.md

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@ mycoder config set githubMode true
8080
# Reset a configuration value to its default
8181
mycoder config clear customPrompt
8282

83-
# Configure model provider and model name
84-
mycoder config set modelProvider openai
85-
mycoder config set modelName gpt-4o-2024-05-13
8683
```
8784

8885
### Model Selection
@@ -93,33 +90,9 @@ MyCoder supports Anthropic, OpenAI, xAI/Grok, Mistral AI, and Ollama models. You
9390

9491
```bash
9592
# Use Anthropic models [These work the best at this time]
96-
mycoder config set modelProvider anthropic
97-
mycoder config set modelName claude-3-7-sonnet-20250219 # or any other Anthropic model
93+
mycoder config set provider anthropic
94+
mycoder config set model claude-3-7-sonnet-20250219 # or any other Anthropic model
9895

99-
# Use OpenAI models
100-
mycoder config set modelProvider openai
101-
mycoder config set modelName gpt-4o-2024-05-13 # or any other OpenAI model
102-
103-
# Use xAI/Grok models
104-
mycoder config set modelProvider xai
105-
mycoder config set modelName grok-1 # or any other xAI model
106-
107-
# Use Mistral AI models
108-
mycoder config set modelProvider mistral
109-
mycoder config set modelName mistral-large-latest # or any other Mistral model
110-
111-
# Use Ollama models (local)
112-
mycoder config set modelProvider ollama
113-
mycoder config set modelName llama3-groq-tool-use # or any other model available in your Ollama instance
114-
115-
# Configure custom Ollama server URL (default is http://localhost:11434/api)
116-
mycoder config set ollamaBaseUrl http://your-ollama-server:11434/api
117-
```
118-
119-
You can also specify the model provider and name directly when running a command:
120-
121-
```bash
122-
mycoder --modelProvider openai --modelName gpt-4o-2024-05-13 "Your prompt here"
12396
```
12497

12598
### Available Configuration Options

packages/cli/src/commands/$default.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,8 @@ export const command: CommandModule<SharedOptions, DefaultArgs> = {
9696
tokenTracker.tokenCache =
9797
argv.tokenCache !== undefined ? argv.tokenCache : userConfig.tokenCache;
9898

99-
const userModelProvider =
100-
argv.provider ||
101-
argv.modelProvider ||
102-
userConfig.provider ||
103-
userConfig.modelProvider;
104-
const userModelName =
105-
argv.model ||
106-
argv.modelName ||
107-
userConfig.model ||
108-
userConfig.modelName;
99+
const userModelProvider = argv.provider || userConfig.provider;
100+
const userModelName = argv.model || userConfig.model;
109101
const userMaxTokens = argv.maxTokens || userConfig.maxTokens;
110102
const userTemperature = argv.temperature || userConfig.temperature;
111103

packages/cli/src/options.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ export type SharedOptions = {
99
readonly sentryDsn?: string;
1010
readonly provider?: string;
1111
readonly model?: string;
12-
// Legacy options - will be removed in a future version
13-
readonly modelProvider?: string;
14-
readonly modelName?: string;
1512
readonly maxTokens?: number;
1613
readonly temperature?: number;
1714
readonly profile?: boolean;
@@ -41,18 +38,6 @@ export const sharedOptions = {
4138
type: 'string',
4239
description: 'AI model name to use',
4340
} as const,
44-
// Legacy options - will be removed in a future version
45-
modelProvider: {
46-
type: 'string',
47-
description: 'AI model provider to use (deprecated, use provider instead)',
48-
choices: ['anthropic', 'openai', 'ollama', 'xai', 'mistral'],
49-
hidden: true,
50-
} as const,
51-
modelName: {
52-
type: 'string',
53-
description: 'AI model name to use (deprecated, use model instead)',
54-
hidden: true,
55-
} as const,
5641
maxTokens: {
5742
type: 'number',
5843
description: 'Maximum number of tokens to generate',

packages/cli/src/settings/config.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ const defaultConfig = {
1414
pageFilter: 'none' as 'simple' | 'none' | 'readability',
1515
provider: 'anthropic',
1616
model: 'claude-3-7-sonnet-20250219',
17-
// Legacy names - will be removed in a future version
18-
modelProvider: 'anthropic',
19-
modelName: 'claude-3-7-sonnet-20250219',
2017
maxTokens: 4096,
2118
temperature: 0.7,
2219
ollamaBaseUrl: 'http://localhost:11434/api',

packages/cli/tests/settings/config-defaults.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ describe('Config Defaults for CLI Options', () => {
6060
pageFilter: 'none',
6161
provider: 'anthropic',
6262
model: 'claude-3-7-sonnet-20250219',
63-
modelProvider: 'anthropic',
64-
modelName: 'claude-3-7-sonnet-20250219',
63+
provider: 'anthropic',
64+
model: 'claude-3-7-sonnet-20250219',
6565
ollamaBaseUrl: 'http://localhost:11434/api',
6666
});
6767

@@ -99,8 +99,8 @@ describe('Config Defaults for CLI Options', () => {
9999
pageFilter: 'none', // Default is none
100100
provider: 'anthropic',
101101
model: 'claude-3-7-sonnet-20250219',
102-
modelProvider: 'anthropic',
103-
modelName: 'claude-3-7-sonnet-20250219',
102+
provider: 'anthropic',
103+
model: 'claude-3-7-sonnet-20250219',
104104
ollamaBaseUrl: 'http://localhost:11434/api',
105105
});
106106

@@ -138,8 +138,8 @@ describe('Config Defaults for CLI Options', () => {
138138
pageFilter: 'none',
139139
provider: 'anthropic',
140140
model: 'claude-3-7-sonnet-20250219',
141-
modelProvider: 'anthropic',
142-
modelName: 'claude-3-7-sonnet-20250219',
141+
provider: 'anthropic',
142+
model: 'claude-3-7-sonnet-20250219',
143143
ollamaBaseUrl: 'http://localhost:11434/api',
144144
});
145145

@@ -189,8 +189,8 @@ describe('Config Defaults for CLI Options', () => {
189189
pageFilter: 'none', // Default is none
190190
provider: 'anthropic',
191191
model: 'claude-3-7-sonnet-20250219',
192-
modelProvider: 'anthropic',
193-
modelName: 'claude-3-7-sonnet-20250219',
192+
provider: 'anthropic',
193+
model: 'claude-3-7-sonnet-20250219',
194194
ollamaBaseUrl: 'http://localhost:11434/api',
195195
});
196196

packages/cli/tests/settings/config.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ describe('Config', () => {
4343
pageFilter: 'none',
4444
provider: 'anthropic',
4545
model: 'claude-3-7-sonnet-20250219',
46-
modelProvider: 'anthropic',
47-
modelName: 'claude-3-7-sonnet-20250219',
46+
provider: 'anthropic',
47+
model: 'claude-3-7-sonnet-20250219',
4848
maxTokens: 4096,
4949
temperature: 0.7,
5050
ollamaBaseUrl: 'http://localhost:11434/api',
@@ -87,8 +87,8 @@ describe('Config', () => {
8787
pageFilter: 'none',
8888
provider: 'anthropic',
8989
model: 'claude-3-7-sonnet-20250219',
90-
modelProvider: 'anthropic',
91-
modelName: 'claude-3-7-sonnet-20250219',
90+
provider: 'anthropic',
91+
model: 'claude-3-7-sonnet-20250219',
9292
maxTokens: 4096,
9393
temperature: 0.7,
9494
ollamaBaseUrl: 'http://localhost:11434/api',

packages/cli/tests/settings/configDefaults.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ describe('Config Defaults for CLI Options', () => {
6060
pageFilter: 'none',
6161
provider: 'anthropic',
6262
model: 'claude-3-7-sonnet-20250219',
63-
modelProvider: 'anthropic',
64-
modelName: 'claude-3-7-sonnet-20250219',
63+
provider: 'anthropic',
64+
model: 'claude-3-7-sonnet-20250219',
6565
ollamaBaseUrl: 'http://localhost:11434/api',
6666
});
6767

@@ -99,8 +99,8 @@ describe('Config Defaults for CLI Options', () => {
9999
pageFilter: 'none', // Default is none
100100
provider: 'anthropic',
101101
model: 'claude-3-7-sonnet-20250219',
102-
modelProvider: 'anthropic',
103-
modelName: 'claude-3-7-sonnet-20250219',
102+
provider: 'anthropic',
103+
model: 'claude-3-7-sonnet-20250219',
104104
ollamaBaseUrl: 'http://localhost:11434/api',
105105
});
106106

@@ -138,8 +138,8 @@ describe('Config Defaults for CLI Options', () => {
138138
pageFilter: 'none',
139139
provider: 'anthropic',
140140
model: 'claude-3-7-sonnet-20250219',
141-
modelProvider: 'anthropic',
142-
modelName: 'claude-3-7-sonnet-20250219',
141+
provider: 'anthropic',
142+
model: 'claude-3-7-sonnet-20250219',
143143
ollamaBaseUrl: 'http://localhost:11434/api',
144144
});
145145

@@ -189,8 +189,8 @@ describe('Config Defaults for CLI Options', () => {
189189
pageFilter: 'none', // Default is none
190190
provider: 'anthropic',
191191
model: 'claude-3-7-sonnet-20250219',
192-
modelProvider: 'anthropic',
193-
modelName: 'claude-3-7-sonnet-20250219',
192+
provider: 'anthropic',
193+
model: 'claude-3-7-sonnet-20250219',
194194
ollamaBaseUrl: 'http://localhost:11434/api',
195195
});
196196

0 commit comments

Comments
 (0)