chore: nuke chat/completions API (#10157)

This commit is contained in:
jif-oai authored and GitHub committed 2026-02-03 11:31:57 +00:00
1 parent 9257d8451c
commit d2394a2494
49 files changed
+268 -2931

No files matched your search

+3 -5
View File
@@ -109,7 +109,7 @@ pub enum ResponseItem {
encrypted_content: Option<String>,
},
LocalShellCall {
/// Set when using the chat completions API.
/// Legacy id field retained for compatibility with older payloads.
#[serde(default, skip_serializing)]
#[ts(skip)]
id: Option<String>,
@@ -125,8 +125,7 @@ pub enum ResponseItem {
name: String,
// The Responses API returns the function call arguments as a *string* that contains
// JSON, not as an already‑parsed object. We keep it as a raw string here and let
// Session::handle_function_call parse it into a Value. This exactly matches the
// Chat Completions + Responses API behavior.
// Session::handle_function_call parse it into a Value.
arguments: String,
call_id: String,
},
@@ -786,8 +785,7 @@ pub enum FunctionCallOutputContentItem {
/// `content` preserves the historical plain-string payload so downstream
/// integrations (tests, logging, etc.) can keep treating tool output as
/// `String`. When an MCP server returns richer data we additionally populate
/// `content_items` with the structured form that the Responses/Chat
/// Completions APIs understand.
/// `content_items` with the structured form that the Responses API understands.
#[derive(Debug, Default, Clone, PartialEq, JsonSchema, TS)]
pub struct FunctionCallOutputPayload {
pub content: String,