Skip to content

graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs

Python

Gemini: minimal effort rides as low; list Gemini 4 Argon

justrachecc6ad7c29d7
diff --git a/src/interactions_wire.zig b/src/interactions_wire.zig
index 02632f3c..3997cf2a 100644
--- a/src/interactions_wire.zig
+++ b/src/interactions_wire.zig
@@ -24,12 +24,12 @@ const std = @import("std");
const Agent = @import("agent.zig").Agent;
const serde = @import("serde.zig");
-/// graff's effort tag → Interactions `thinking_level`. The endpoint names its
-/// own accepted set in the rejection: high, low, medium, minimal, none.
+/// graff's effort tag → Interactions `thinking_level`. Current models accept
+/// only low, medium and high ("'minimal' is not a supported thinking level for
+/// this model"), so minimal and none ride as low.
pub fn thinkingLevel(effort: []const u8) []const u8 {
if (std.mem.eql(u8, effort, "max") or std.mem.eql(u8, effort, "high")) return "high";
if (std.mem.eql(u8, effort, "medium")) return "medium";
- if (std.mem.eql(u8, effort, "minimal") or std.mem.eql(u8, effort, "none")) return "minimal";
return "low";
}
@@ -65,13 +65,13 @@ pub fn write(self: *Agent, s: *std.json.Stringify, tools: ?[]const u8, force_too
}
test "thinking_level maps graff's efforts onto the accepted set" {
- // The set is the endpoint's own: "Valid values are: high, low, medium,
- // minimal, none" — anything else 400s the request.
+ // Current models take low, medium and high; anything else 400s the request.
try std.testing.expectEqualStrings("high", thinkingLevel("max"));
try std.testing.expectEqualStrings("high", thinkingLevel("high"));
try std.testing.expectEqualStrings("medium", thinkingLevel("medium"));
try std.testing.expectEqualStrings("low", thinkingLevel("low"));
- try std.testing.expectEqualStrings("minimal", thinkingLevel("minimal"));
+ try std.testing.expectEqualStrings("low", thinkingLevel("minimal"));
+ try std.testing.expectEqualStrings("low", thinkingLevel("none"));
// An unknown tag degrades to a level the endpoint accepts, never to a 400.
try std.testing.expectEqualStrings("low", thinkingLevel("nonsense"));
}
diff --git a/src/pricing_gateway.zig b/src/pricing_gateway.zig
index c797d775..d52761fb 100644
--- a/src/pricing_gateway.zig
+++ b/src/pricing_gateway.zig
@@ -13,6 +13,7 @@ pub const rows = [_]ModelPrice{
.{ .name = "deepseek-v4-pro", .in = 0.435, .out = 0.87, .cache = 0.0036, .cache_write_multiplier = 1 },
.{ .name = "gemini-3.7-flash", .in = 0.75, .out = 3.75, .cache = 0.075, .cache_write_multiplier = 1 },
.{ .name = "gemini-3.8-flash", .in = 0.75, .out = 3.75, .cache = 0.075, .cache_write_multiplier = 1 },
+ .{ .name = "gemini-4-argon", .in = 2.2, .out = 11.0, .cache = 0.11, .cache_write_multiplier = 1 },
.{ .name = "glm-5.2", .in = 1.68, .out = 5.28, .cache = 0.312, .cache_write_multiplier = 1 },
.{ .name = "glm-5.3", .in = 1.68, .out = 5.28, .cache = 0.312, .cache_write_multiplier = 1 },
.{ .name = "glm-5.3-flash", .in = 0.075, .out = 0.25, .cache = 0.015, .cache_write_multiplier = 1 },
diff --git a/src/pricing_models.zig b/src/pricing_models.zig
index 56b916e1..b0954e06 100644
--- a/src/pricing_models.zig
+++ b/src/pricing_models.zig
@@ -165,6 +165,7 @@ pub const rows = [_]ModelInfo{
// contextFor falls to default_context and a 1M model compacts at 160k.
// Efforts mirror the compat layer's own rejection message: "Valid values
// are: high, low, medium, minimal, none".
+ .{ .provider = "google", .name = "gemini-4-argon", .context = 1_048_576, .supports_reasoning = true, .thinking_support = .both, .support_efforts = &.{ "low", "medium", "high" }, .default_effort = "medium" },
.{ .provider = "google", .name = "gemini-3.8-flash", .context = 1_048_576, .supports_reasoning = true, .thinking_support = .both, .support_efforts = &.{ "minimal", "low", "medium", "high" }, .default_effort = "medium" },
.{ .provider = "google", .name = "gemini-3.7-flash", .context = 1_048_576, .supports_reasoning = true, .thinking_support = .both, .support_efforts = &.{ "minimal", "low", "medium", "high" }, .default_effort = "medium" },
.{ .provider = "google", .name = "gemini-3.6-flash", .context = 1_048_576, .supports_reasoning = true, .thinking_support = .both },