Skip to content

Commit 527333e

Browse files
committed
chore: remove other AI providers for the time being.
1 parent 9de3e35 commit 527333e

File tree

11 files changed

+19
-165
lines changed

11 files changed

+19
-165
lines changed

docs/github-comment-commands.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ For this feature to work in your repository:
7474
1. The GitHub Action workflow must be present in your repository
7575
2. You need to configure the necessary API keys as GitHub secrets:
7676
- `GITHUB_TOKEN` (automatically provided)
77-
- `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `XAI_API_KEY`, or `MISTRAL_API_KEY` (depending on your preferred model)
77+
- `ANTHROPIC_API_KEY` (depending on your preferred model)
7878

7979
## Limitations
8080

packages/agent/src/core/llm/examples.ts

Lines changed: 0 additions & 103 deletions
This file was deleted.

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

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,21 @@ import { ToolContext } from '../types';
88
/**
99
* Available model providers
1010
*/
11-
export type ModelProvider =
12-
| 'anthropic'
11+
export type ModelProvider = 'anthropic';
12+
/*
1313
| 'openai'
1414
| 'ollama'
1515
| 'xai'
16-
| 'mistral';
16+
| 'mistral'*/
1717

1818
/**
1919
* Get the model instance based on provider and model name
2020
*/
21-
export function getModel(
22-
provider: ModelProvider,
23-
model: string,
24-
options?: { ollamaBaseUrl?: string },
25-
): LLMProvider {
21+
export function getModel(provider: ModelProvider, model: string): LLMProvider {
2622
switch (provider) {
2723
case 'anthropic':
2824
return createProvider('anthropic', model);
29-
case 'openai':
25+
/*case 'openai':
3026
return createProvider('openai', model);
3127
case 'ollama':
3228
if (options?.ollamaBaseUrl) {
@@ -38,7 +34,7 @@ export function getModel(
3834
case 'xai':
3935
return createProvider('xai', model);
4036
case 'mistral':
41-
return createProvider('mistral', model);
37+
return createProvider('mistral', model);*/
4238
default:
4339
throw new Error(`Unknown model provider: ${provider}`);
4440
}

packages/agent/src/utils/errors.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export const providerConfig: Record<
77
keyName: 'ANTHROPIC_API_KEY',
88
docsUrl: 'https://mycoder.ai/docs/getting-started/anthropic',
99
},
10+
/*
1011
openai: {
1112
keyName: 'OPENAI_API_KEY',
1213
docsUrl: 'https://mycoder.ai/docs/getting-started/openai',
@@ -18,9 +19,9 @@ export const providerConfig: Record<
1819
mistral: {
1920
keyName: 'MISTRAL_API_KEY',
2021
docsUrl: 'https://mycoder.ai/docs/getting-started/mistral',
21-
},
22+
},*/
2223
// No API key needed for ollama as it uses a local server
23-
ollama: undefined,
24+
//ollama: undefined,
2425
};
2526

2627
/**

packages/cli/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ mycoder config set model claude-3-7-sonnet-20250219 # or any other Anthropic mo
101101
- `headless`: Run browser in headless mode with no UI showing (default: `true`)
102102
- `userSession`: Use user's existing browser session instead of sandboxed session (default: `false`)
103103
- `pageFilter`: Method to process webpage content: 'simple', 'none', or 'readability' (default: `none`)
104-
- `ollamaBaseUrl`: Base URL for Ollama API (default: `http://localhost:11434/api`)
105104
- `customPrompt`: Custom instructions to append to the system prompt for both main agent and sub-agents (default: `""`)
106105
- `tokenCache`: Enable token caching for LLM API calls (default: `true`)
107106

@@ -117,9 +116,6 @@ mycoder config set userSession true
117116
# Use readability for webpage processing
118117
mycoder config set pageFilter readability
119118

120-
# Set custom Ollama server URL
121-
mycoder config set ollamaBaseUrl http://your-ollama-server:11434/api
122-
123119
# Set custom instructions for the agent
124120
mycoder config set customPrompt "Always prioritize readability and simplicity in your code. Prefer TypeScript over JavaScript when possible."
125121

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,12 @@ export const command: CommandModule<SharedOptions, DefaultArgs> = {
185185
const agentConfig = {
186186
...DEFAULT_CONFIG,
187187
model: getModel(
188-
userModelProvider as
189-
| 'anthropic'
188+
userModelProvider as 'anthropic' /*
190189
| 'openai'
191190
| 'ollama'
192191
| 'xai'
193-
| 'mistral',
192+
| 'mistral'*/,
194193
userModelName,
195-
{ ollamaBaseUrl: config.ollamaBaseUrl },
196194
),
197195
maxTokens: userMaxTokens,
198196
temperature: userTemperature,

packages/cli/src/options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const sharedOptions = {
3434
provider: {
3535
type: 'string',
3636
description: 'AI model provider to use',
37-
choices: ['anthropic', 'openai', 'ollama', 'xai', 'mistral'],
37+
choices: ['anthropic' /*, 'openai', 'ollama', 'xai', 'mistral'*/],
3838
} as const,
3939
model: {
4040
type: 'string',

packages/cli/src/settings/config.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,11 @@ const defaultConfig = {
1616
model: 'claude-3-7-sonnet-20250219',
1717
maxTokens: 4096,
1818
temperature: 0.7,
19-
ollamaBaseUrl: 'http://localhost:11434/api',
2019
customPrompt: '',
2120
profile: false,
2221
tokenCache: true,
2322
// API keys (empty by default)
2423
ANTHROPIC_API_KEY: '',
25-
OPENAI_API_KEY: '',
26-
XAI_API_KEY: '',
27-
MISTRAL_API_KEY: '',
2824
};
2925

3026
export type Config = typeof defaultConfig;

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

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,12 @@ describe('Config Defaults for CLI Options', () => {
6060
pageFilter: 'none',
6161
provider: 'anthropic',
6262
model: 'claude-3-7-sonnet-20250219',
63-
provider: 'anthropic',
64-
model: 'claude-3-7-sonnet-20250219',
65-
ollamaBaseUrl: 'http://localhost:11434/api',
63+
maxTokens: 0,
64+
temperature: 0,
65+
customPrompt: '',
66+
profile: false,
67+
tokenCache: false,
68+
ANTHROPIC_API_KEY: '',
6669
});
6770

6871
// Create minimal args (no headless, userSession, or pageFilter specified)
@@ -99,9 +102,6 @@ describe('Config Defaults for CLI Options', () => {
99102
pageFilter: 'none', // Default is none
100103
provider: 'anthropic',
101104
model: 'claude-3-7-sonnet-20250219',
102-
provider: 'anthropic',
103-
model: 'claude-3-7-sonnet-20250219',
104-
ollamaBaseUrl: 'http://localhost:11434/api',
105105
});
106106

107107
// Create args with explicit values (overriding defaults)
@@ -138,9 +138,6 @@ describe('Config Defaults for CLI Options', () => {
138138
pageFilter: 'none',
139139
provider: 'anthropic',
140140
model: 'claude-3-7-sonnet-20250219',
141-
provider: 'anthropic',
142-
model: 'claude-3-7-sonnet-20250219',
143-
ollamaBaseUrl: 'http://localhost:11434/api',
144141
});
145142

146143
// Create minimal args (no headless, userSession, or pageFilter specified)
@@ -189,9 +186,6 @@ describe('Config Defaults for CLI Options', () => {
189186
pageFilter: 'none', // Default is none
190187
provider: 'anthropic',
191188
model: 'claude-3-7-sonnet-20250219',
192-
provider: 'anthropic',
193-
model: 'claude-3-7-sonnet-20250219',
194-
ollamaBaseUrl: 'http://localhost:11434/api',
195189
});
196190

197191
// Create args with explicit values (overriding defaults)

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,13 @@ describe('Config', () => {
4343
pageFilter: 'none',
4444
provider: 'anthropic',
4545
model: 'claude-3-7-sonnet-20250219',
46-
provider: 'anthropic',
47-
model: 'claude-3-7-sonnet-20250219',
4846
maxTokens: 4096,
4947
temperature: 0.7,
50-
ollamaBaseUrl: 'http://localhost:11434/api',
5148
profile: false,
5249
customPrompt: '',
5350
tokenCache: true,
5451
// API keys
5552
ANTHROPIC_API_KEY: '',
56-
OPENAI_API_KEY: '',
57-
XAI_API_KEY: '',
58-
MISTRAL_API_KEY: '',
5953
});
6054
expect(fs.existsSync).toHaveBeenCalledWith(mockConfigFile);
6155
});
@@ -87,19 +81,13 @@ describe('Config', () => {
8781
pageFilter: 'none',
8882
provider: 'anthropic',
8983
model: 'claude-3-7-sonnet-20250219',
90-
provider: 'anthropic',
91-
model: 'claude-3-7-sonnet-20250219',
9284
maxTokens: 4096,
9385
temperature: 0.7,
94-
ollamaBaseUrl: 'http://localhost:11434/api',
9586
profile: false,
9687
customPrompt: '',
9788
tokenCache: true,
9889
// API keys
9990
ANTHROPIC_API_KEY: '',
100-
OPENAI_API_KEY: '',
101-
XAI_API_KEY: '',
102-
MISTRAL_API_KEY: '',
10391
});
10492
});
10593
});

0 commit comments

Comments
 (0)