Support anyOf and enum in JsonSchema (#16875)

This brings us into better alignment with the JSON schema subset that is
supported in
<https://developers.openai.com/api/docs/guides/structured-outputs#supported-schemas>,
and also allows us to render richer function signatures in code mode
(e.g., anyOf{null, OtherObjectType})
This commit is contained in:
Vivian Fang
2026-04-08 01:07:55 -07:00
committed by GitHub
parent abc678f9e8
commit ea516f9a40
36 changed files with 1797 additions and 1657 deletions
+1 -5
View File
@@ -45,11 +45,7 @@ pub fn create_js_repl_reset_tool() -> ToolSpec {
.to_string(),
strict: false,
defer_loading: None,
parameters: JsonSchema::Object {
properties: BTreeMap::new(),
required: None,
additional_properties: Some(false.into()),
},
parameters: JsonSchema::object(BTreeMap::new(), /*required*/ None, Some(false.into())),
output_schema: None,
})
}