mirror of
https://github.com/openai/codex.git
synced 2026-05-15 16:53:05 +00:00
test
This commit is contained in:
@@ -18,6 +18,8 @@ use codex_protocol::openai_models::ModelInfo;
|
||||
use codex_protocol::protocol::SessionSource;
|
||||
use codex_tools::DiscoverableTool;
|
||||
use codex_tools::JsonSchema;
|
||||
use codex_tools::JsonSchemaPrimitiveType;
|
||||
use codex_tools::JsonSchemaType;
|
||||
use codex_tools::REQUEST_PLUGIN_INSTALL_TOOL_NAME;
|
||||
use codex_tools::ResponsesApiNamespaceTool;
|
||||
use codex_tools::ResponsesApiTool;
|
||||
@@ -1013,7 +1015,7 @@ async fn direct_mcp_tools_register_namespaced_handlers() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_mcp_tool_property_missing_type_defaults_to_string() {
|
||||
async fn test_mcp_tool_property_missing_type_defaults_to_open_object() {
|
||||
let config = test_config().await;
|
||||
let model_info = construct_model_info_offline("gpt-5.4", &config);
|
||||
let mut features = Features::with_defaults();
|
||||
@@ -1059,7 +1061,13 @@ async fn test_mcp_tool_property_missing_type_defaults_to_string() {
|
||||
/*properties*/
|
||||
BTreeMap::from([(
|
||||
"query".to_string(),
|
||||
JsonSchema::string(Some("search query".to_string())),
|
||||
JsonSchema {
|
||||
schema_type: Some(JsonSchemaType::Single(JsonSchemaPrimitiveType::Object)),
|
||||
description: Some("search query".to_string()),
|
||||
properties: Some(BTreeMap::new()),
|
||||
additional_properties: Some(true.into()),
|
||||
..Default::default()
|
||||
},
|
||||
)]),
|
||||
/*required*/ None,
|
||||
/*additional_properties*/ None
|
||||
|
||||
Reference in New Issue
Block a user