feat(models): add GPT-5.3 Codex, full GPT-5.x family, Claude 4.x series, o4-mini (#197)

Fixes #184 — updates model selection, priority sort, and cost table to
match current OpenAI and Anthropic model catalogs.

OpenAI: GPT-5.3 Codex, GPT-5.2 Codex/Pro, GPT-5.1 Codex/Mini/Max,
GPT-5/Mini/Nano, GPT-4.1/Mini/Nano, o4-mini, o3/Pro
Anthropic: Claude Opus 4.6/4.5/4.1/4.0, Claude Sonnet 4.6/4.5/4.0,
Claude Haiku 4.5, Claude 3.7 Sonnet, Claude 3.5 Haiku

Also resolves stale merge-conflict markers in http.rs and json.rs.
This commit is contained in:
bigguybobby
2026-02-20 01:16:13 +00:00
committed by GitHub
parent fa64df05ff
commit dae26d640e
4 changed files with 102 additions and 40 deletions
+16 -9
View File
@@ -189,8 +189,8 @@ impl Tool for HttpTool {
}
},
"body": {
"type": "string",
"description": "Request body. Use plain text or serialized JSON."
"type": ["object", "array", "string", "number", "boolean", "null"],
"description": "Request body (for POST/PUT/PATCH)"
},
"timeout_secs": {
"type": "integer",
@@ -361,13 +361,6 @@ impl Tool for HttpTool {
mod tests {
use super::*;
#[test]
fn test_http_tool_schema_body_has_type() {
let tool = HttpTool::new();
let schema = tool.parameters_schema();
assert_eq!(schema["properties"]["body"]["type"], "string");
}
#[test]
fn test_http_tool_schema_headers_is_array() {
let tool = HttpTool::new();
@@ -460,4 +453,18 @@ mod tests {
]
);
}
#[test]
fn test_http_tool_schema_body_has_type() {
let schema = HttpTool::new().parameters_schema();
let body = schema
.get("properties")
.and_then(|p| p.get("body"))
.expect("body schema missing");
assert!(
body.get("type").is_some(),
"body schema must include a type for OpenAI-compatible tool validation"
);
}
}
+16 -9
View File
@@ -28,8 +28,8 @@ impl Tool for JsonTool {
"description": "The JSON operation to perform"
},
"data": {
"type": "string",
"description": "JSON input string. For query/stringify/validate, pass serialized JSON."
"type": ["string", "object", "array", "number", "boolean", "null"],
"description": "JSON input data. Pass a string for parse, any type otherwise."
},
"path": {
"type": "string",
@@ -154,13 +154,6 @@ fn query_json(data: &serde_json::Value, path: &str) -> Result<serde_json::Value,
mod tests {
use super::*;
#[test]
fn test_json_tool_schema_data_has_type() {
let tool = JsonTool;
let schema = tool.parameters_schema();
assert_eq!(schema["properties"]["data"]["type"], "string");
}
#[test]
fn test_query_json() {
let data = serde_json::json!({
@@ -197,4 +190,18 @@ mod tests {
let err = parse_json_input(&input).unwrap_err();
assert!(err.to_string().contains("invalid JSON input"));
}
#[test]
fn test_json_tool_schema_data_has_type() {
let schema = JsonTool.parameters_schema();
let data = schema
.get("properties")
.and_then(|p| p.get("data"))
.expect("data schema missing");
assert!(
data.get("type").is_some(),
"data schema must include a type for OpenAI-compatible tool validation"
);
}
}