Compare commits

...

1 Commits

Author SHA1 Message Date
opencode-agent[bot] ee0dbe3cdd Added reasoning config schema + updated models
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
2025-10-24 15:06:57 +00:00
7 changed files with 85 additions and 14 deletions
+28 -3
View File
@@ -5,7 +5,29 @@ export const Model = z
id: z.string(),
name: z.string().min(1, "Model name cannot be empty"),
attachment: z.boolean(),
reasoning: z.boolean(),
reasoning: z.union([
z.boolean(),
z.object({
supported: z.boolean(),
controllable: z.boolean().optional(),
type: z.enum(["effort", "budget"]).optional(),
effort_levels: z.array(z.string()).optional(),
budget_range: z.object({
min: z.number(),
max: z.number(),
dynamic: z.number().optional(),
off: z.number().optional(),
}).optional(),
default: z.union([z.string(), z.number()]).optional(),
}).refine((data) => {
if (!data.supported) return true;
if (data.type === "effort" && !data.effort_levels?.length) return false;
if (data.type === "budget" && !data.budget_range) return false;
return true;
}, {
message: "effort_levels required for type 'effort', budget_range required for type 'budget'"
}),
]),
temperature: z.boolean(),
tool_call: z.boolean(),
knowledge: z
@@ -66,10 +88,13 @@ export const Model = z
.strict()
.refine(
(data) => {
return !(data.reasoning === false && data.cost?.reasoning !== undefined);
const reasoningSupported = typeof data.reasoning === "boolean"
? data.reasoning
: data.reasoning.supported;
return !(reasoningSupported === false && data.cost?.reasoning !== undefined);
},
{
message: "Cannot set cost.reasoning when reasoning is false",
message: "Cannot set cost.reasoning when reasoning is not supported",
path: ["cost", "reasoning"],
}
);
+11 -1
View File
@@ -402,7 +402,17 @@ export const Rendered = renderToString(
</div>
</td>
<td>{model.tool_call ? "Yes" : "No"}</td>
<td>{model.reasoning ? "Yes" : "No"}</td>
<td>{
typeof model.reasoning === "boolean"
? (model.reasoning ? "Yes" : "No")
: model.reasoning.supported
? (model.reasoning.controllable === false
? "Always"
: model.reasoning.type
? `Yes (${model.reasoning.type})`
: "Yes")
: "No"
}</td>
<td>
<div class="modalities">
{model.modalities.input.map((modality) =>
+13 -2
View File
@@ -2,12 +2,23 @@ name = "Gemini 2.5 Flash"
release_date = "2025-03-20"
last_updated = "2025-06-05"
attachment = true
reasoning = true
temperature = true
knowledge = "2025-01"
tool_call = true
open_weights = false
[reasoning]
supported = true
controllable = true
type = "budget"
default = -1
[reasoning.budget_range]
min = 0
max = 24576
dynamic = -1
off = 0
[cost]
input = 0.30
output = 2.50
@@ -20,4 +31,4 @@ output = 65_536
[modalities]
input = ["text", "image", "audio", "video", "pdf"]
output = ["text"]
output = ["text"]
+12 -2
View File
@@ -2,12 +2,22 @@ name = "Gemini 2.5 Pro"
release_date = "2025-03-20"
last_updated = "2025-06-05"
attachment = true
reasoning = true
temperature = true
knowledge = "2025-01"
tool_call = true
open_weights = false
[reasoning]
supported = true
controllable = false
type = "budget"
default = -1
[reasoning.budget_range]
min = 128
max = 32768
dynamic = -1
[cost]
input = 1.25
output = 10.00
@@ -19,4 +29,4 @@ output = 65_536
[modalities]
input = ["text", "image", "audio", "video", "pdf"]
output = ["text"]
output = ["text"]
+8 -2
View File
@@ -2,12 +2,18 @@ name = "GPT-5"
release_date = "2025-08-07"
last_updated = "2025-08-07"
attachment = true
reasoning = true
temperature = false
knowledge = "2024-09-30"
tool_call = true
open_weights = false
[reasoning]
supported = true
controllable = true
type = "effort"
effort_levels = ["low", "medium", "high"]
default = "medium"
[cost]
input = 1.25
output = 10.00
@@ -19,4 +25,4 @@ output = 128_000
[modalities]
input = ["text", "image"]
output = ["text"]
output = ["text"]
+8 -2
View File
@@ -2,12 +2,18 @@ name = "Grok 3 Mini Fast"
release_date = "2025-02-17"
last_updated = "2025-02-17"
attachment = false
reasoning = true
temperature = true
knowledge = "2024-11"
tool_call = true
open_weights = false
[reasoning]
supported = true
controllable = true
type = "effort"
effort_levels = ["low", "high"]
default = "high"
[cost]
input = 0.60
output = 4.00
@@ -20,4 +26,4 @@ output = 8_192
[modalities]
input = ["text"]
output = ["text"]
output = ["text"]
+5 -2
View File
@@ -2,12 +2,15 @@ name = "Grok 4 Fast"
release_date = "2025-09-19"
last_updated = "2025-09-19"
attachment = true
reasoning = true
temperature = true
knowledge = "2025-07"
tool_call = true
open_weights = false
[reasoning]
supported = true
controllable = false
[cost]
input = 0.20
output = 0.50
@@ -19,4 +22,4 @@ output = 30_000
[modalities]
input = ["text", "image"]
output = ["text"]
output = ["text"]