Skip to content

Commit 81982b9

Browse files
committed
feat(providers)!: remove OpenAI preset and update Anthropic models
- Remove OpenAI provider preset completely - Update Anthropic provider to use claude-opus-4-5 (planning) and claude-sonnet-4-5 (execution) - Update all documentation, tests, and help text accordingly BREAKING CHANGE: OpenAI provider preset has been removed. Users must now use one of the remaining providers (github, anthropic, opencode) or specify models explicitly with -P and -E flags. Signed-off-by: leocavalcante <[email protected]>
1 parent 5618b15 commit 81982b9

File tree

3 files changed

+18
-49
lines changed

3 files changed

+18
-49
lines changed

README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
- **Autonomous Development Loop** - Continuously plans, executes, and evaluates without stopping
1010
- **Ideas Queue** - Drop markdown files in `.opencoder/ideas/` to prioritize specific tasks before autonomous planning
1111
- **Two-Model Architecture** - Uses a high-capability model for planning and a faster model for execution
12-
- **Provider Presets** - Quick setup with GitHub Copilot, Anthropic, OpenAI, or OpenCode backends
12+
- **Provider Presets** - Quick setup with GitHub Copilot, Anthropic, or OpenCode backends
1313
- **State Persistence** - Resumes from where it left off after interruptions (JSON format)
1414
- **Exponential Backoff** - Graceful retry logic for transient failures
1515
- **Plan History** - Archives completed plans for reference
@@ -108,9 +108,6 @@ opencoder --provider github
108108
# Anthropic Claude
109109
opencoder --provider anthropic
110110

111-
# OpenAI GPT
112-
opencoder --provider openai
113-
114111
# OpenCode free models
115112
opencoder --provider opencode
116113
```
@@ -128,15 +125,15 @@ opencoder --provider opencode "implement authentication with JWT"
128125
### Using Explicit Models
129126

130127
```bash
131-
opencoder -P anthropic/claude-sonnet-4 -E anthropic/claude-haiku
132-
opencoder -P openai/gpt-4 -E openai/gpt-4o-mini "build a CLI tool"
128+
opencoder -P anthropic/claude-opus-4-5 -E anthropic/claude-sonnet-4-5
129+
opencoder -P opencode/glm-4.7-free -E opencode/minimax-m2.1-free "build a CLI tool"
133130
```
134131

135132
### Options
136133

137134
| Flag | Description |
138135
|------|-------------|
139-
| `--provider PROVIDER` | Use a provider preset (github, anthropic, openai, opencode) |
136+
| `--provider PROVIDER` | Use a provider preset (github, anthropic, opencode) |
140137
| `-P, --planning-model MODEL` | Model for planning/evaluation phases |
141138
| `-E, --execution-model MODEL` | Model for task execution |
142139
| `-p, --project DIR` | Project directory (default: current directory) |
@@ -149,8 +146,7 @@ opencoder -P openai/gpt-4 -E openai/gpt-4o-mini "build a CLI tool"
149146
| Provider | Planning Model | Execution Model |
150147
|----------|----------------|-----------------|
151148
| `github` | claude-opus-4.5 | claude-sonnet-4.5 |
152-
| `anthropic` | claude-sonnet-4 | claude-haiku |
153-
| `openai` | gpt-4 | gpt-4o-mini |
149+
| `anthropic` | claude-opus-4-5 | claude-sonnet-4-5 |
154150
| `opencode` | glm-4.7-free | minimax-m2.1-free |
155151

156152
## How It Works

src/cli.zig

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ const usage_text =
129129
\\ opencoder -P MODEL -E MODEL [OPTIONS] [HINT]
130130
\\
131131
\\Required Arguments (choose one):
132-
\\ --provider PROVIDER Use a provider preset (github, anthropic, openai, opencode)
133-
\\ -P, --planning-model MODEL Model for planning/evaluation (e.g., anthropic/claude-sonnet-4)
134-
\\ -E, --execution-model MODEL Model for task execution (e.g., anthropic/claude-haiku)
132+
\\ --provider PROVIDER Use a provider preset (github, anthropic, opencode)
133+
\\ -P, --planning-model MODEL Model for planning/evaluation (e.g., anthropic/claude-opus-4-5)
134+
\\ -E, --execution-model MODEL Model for task execution (e.g., anthropic/claude-sonnet-4-5)
135135
\\
136136
\\Optional Arguments:
137137
\\ -p, --project DIR Project directory (default: $OPENCODER_PROJECT_DIR or $PWD)
@@ -142,8 +142,7 @@ const usage_text =
142142
\\
143143
\\Provider Presets:
144144
\\ github Planning: claude-opus-4.5, Execution: claude-sonnet-4.5
145-
\\ anthropic Planning: claude-sonnet-4, Execution: claude-haiku
146-
\\ openai Planning: gpt-4, Execution: gpt-4o-mini
145+
\\ anthropic Planning: claude-opus-4-5, Execution: claude-sonnet-4-5
147146
\\ opencode Planning: glm-4.7-free, Execution: minimax-m2.1-free
148147
\\
149148
\\Environment Variables:
@@ -194,7 +193,7 @@ pub fn formatError(err: ParseError, file: std.fs.File) void {
194193
\\ 1. Provider preset: opencoder --provider github
195194
\\ 2. Explicit models: opencoder -P planning-model -E execution-model
196195
\\
197-
\\Available providers: github, anthropic, openai, opencode
196+
\\Available providers: github, anthropic, opencode
198197
\\
199198
\\For detailed help, run: opencoder --help
200199
\\
@@ -217,8 +216,7 @@ pub fn formatError(err: ParseError, file: std.fs.File) void {
217216
\\
218217
\\Available providers:
219218
\\ github - GitHub Copilot models (Claude Opus 4.5 / Sonnet 4.5)
220-
\\ anthropic - Anthropic models (Claude Sonnet 4 / Haiku)
221-
\\ openai - OpenAI models (GPT-4 / GPT-4o-mini)
219+
\\ anthropic - Anthropic models (Claude Opus 4-5 / Sonnet 4-5)
222220
\\ opencode - OpenCode free models (GLM-4.7 / Minimax M2.1)
223221
\\
224222
\\Usage: opencoder --provider <name>
@@ -307,18 +305,8 @@ test "parse with anthropic provider preset" {
307305
defer if (result == .run) std.testing.allocator.free(result.run.project_dir);
308306

309307
try std.testing.expect(result == .run);
310-
try std.testing.expectEqualStrings("anthropic/claude-sonnet-4", result.run.planning_model);
311-
try std.testing.expectEqualStrings("anthropic/claude-haiku", result.run.execution_model);
312-
}
313-
314-
test "parse with openai provider preset" {
315-
const args = &[_][]const u8{ "--provider", "openai" };
316-
const result = try parseFromSlice(std.testing.allocator, args);
317-
defer if (result == .run) std.testing.allocator.free(result.run.project_dir);
318-
319-
try std.testing.expect(result == .run);
320-
try std.testing.expectEqualStrings("openai/gpt-4", result.run.planning_model);
321-
try std.testing.expectEqualStrings("openai/gpt-4o-mini", result.run.execution_model);
308+
try std.testing.expectEqualStrings("anthropic/claude-opus-4-5", result.run.planning_model);
309+
try std.testing.expectEqualStrings("anthropic/claude-sonnet-4-5", result.run.execution_model);
322310
}
323311

324312
test "parse with opencode provider preset" {
@@ -422,7 +410,7 @@ test "parse with mixed explicit models and provider (explicit wins)" {
422410
}
423411

424412
test "parse with options in different order" {
425-
const args = &[_][]const u8{ "-v", "build something", "--provider", "openai", "-p", "." };
413+
const args = &[_][]const u8{ "-v", "build something", "--provider", "github", "-p", "." };
426414
const result = try parseFromSlice(std.testing.allocator, args);
427415
defer if (result == .run) std.testing.allocator.free(result.run.project_dir);
428416

src/config.zig

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,13 @@ pub const version = "0.1.0";
1313
pub const Provider = enum {
1414
github,
1515
anthropic,
16-
openai,
1716
opencode,
1817

1918
/// Parse provider from string
2019
pub fn fromString(str: []const u8) ?Provider {
2120
const map = std.StaticStringMap(Provider).initComptime(.{
2221
.{ "github", .github },
2322
.{ "anthropic", .anthropic },
24-
.{ "openai", .openai },
2523
.{ "opencode", .opencode },
2624
});
2725
return map.get(str);
@@ -32,7 +30,6 @@ pub const Provider = enum {
3230
return switch (self) {
3331
.github => "github",
3432
.anthropic => "anthropic",
35-
.openai => "openai",
3633
.opencode => "opencode",
3734
};
3835
}
@@ -52,12 +49,8 @@ pub fn getProviderModels(provider: Provider) ModelPair {
5249
.execution = "github-copilot/claude-sonnet-4.5",
5350
},
5451
.anthropic => .{
55-
.planning = "anthropic/claude-sonnet-4",
56-
.execution = "anthropic/claude-haiku",
57-
},
58-
.openai => .{
59-
.planning = "openai/gpt-4",
60-
.execution = "openai/gpt-4o-mini",
52+
.planning = "anthropic/claude-opus-4-5",
53+
.execution = "anthropic/claude-sonnet-4-5",
6154
},
6255
.opencode => .{
6356
.planning = "opencode/glm-4.7-free",
@@ -140,7 +133,6 @@ pub const Config = struct {
140133
test "Provider.fromString parses valid providers" {
141134
try std.testing.expectEqual(Provider.github, Provider.fromString("github").?);
142135
try std.testing.expectEqual(Provider.anthropic, Provider.fromString("anthropic").?);
143-
try std.testing.expectEqual(Provider.openai, Provider.fromString("openai").?);
144136
try std.testing.expectEqual(Provider.opencode, Provider.fromString("opencode").?);
145137
}
146138

@@ -152,7 +144,6 @@ test "Provider.fromString returns null for invalid provider" {
152144
test "Provider.toString returns correct strings" {
153145
try std.testing.expectEqualStrings("github", Provider.github.toString());
154146
try std.testing.expectEqualStrings("anthropic", Provider.anthropic.toString());
155-
try std.testing.expectEqualStrings("openai", Provider.openai.toString());
156147
try std.testing.expectEqualStrings("opencode", Provider.opencode.toString());
157148
}
158149

@@ -164,14 +155,8 @@ test "getProviderModels returns correct models for github" {
164155

165156
test "getProviderModels returns correct models for anthropic" {
166157
const models = getProviderModels(.anthropic);
167-
try std.testing.expectEqualStrings("anthropic/claude-sonnet-4", models.planning);
168-
try std.testing.expectEqualStrings("anthropic/claude-haiku", models.execution);
169-
}
170-
171-
test "getProviderModels returns correct models for openai" {
172-
const models = getProviderModels(.openai);
173-
try std.testing.expectEqualStrings("openai/gpt-4", models.planning);
174-
try std.testing.expectEqualStrings("openai/gpt-4o-mini", models.execution);
158+
try std.testing.expectEqualStrings("anthropic/claude-opus-4-5", models.planning);
159+
try std.testing.expectEqualStrings("anthropic/claude-sonnet-4-5", models.execution);
175160
}
176161

177162
test "getProviderModels returns correct models for opencode" {

0 commit comments

Comments
 (0)