Skip to content

Commit 0a5ec80

Browse files
committed
fix: recursively enforce required properties in OpenAI tool schemas
Fixes Chrome MCP with openai 5.2 Signed-off-by: David Gageot <david.gageot@docker.com>
1 parent fca6071 commit 0a5ec80

6 files changed

Lines changed: 220 additions & 98 deletions

File tree

e2e/cagent_exec_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,7 @@ func TestExec_Mistral(t *testing.T) {
122122
func TestExec_Mistral_ToolCall(t *testing.T) {
123123
out := cagent(t, "exec", "testdata/fs_tools.yaml", "--model=mistral/mistral-small", "How many files in testdata/working_dir? Only output the number.")
124124

125-
// NOTE: If you look at the LLM response, Mistral says it sees 2 files, yours truly got tired of re-running this test to get it to say "1".
126-
// For now, just update the expected output
127-
require.Equal(t, "\n--- Agent: root ---\n\nCalling list_directory(path: \"testdata/working_dir\")\n\nlist_directory response → \"FILE README.me\\n\"\n2", out)
125+
require.Equal(t, "\n--- Agent: root ---\n\nCalling list_directory(path: \"testdata/working_dir\")\n\nlist_directory response → \"FILE README.me\\n\"\n1", out)
128126
}
129127

130128
func TestExec_ToolCallsNeedAcceptance(t *testing.T) {

0 commit comments

Comments
 (0)