mirror of
https://github.com/instructkr/claw-code.git
synced 2026-06-06 06:27:08 +08:00
fix: make id field optional in OpenAI response parsing
Some OpenAI-compatible providers (e.g., GLM-5) omit the `id` field in streaming and non-streaming responses. Adding #[serde(default)] allows the parser to accept these responses instead of failing with "missing field `id`". Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
committed by
Independent Security Research
parent
ed91a61eec
commit
453ab6421b
@@ -1476,10 +1476,15 @@ pub fn validate_slash_command_input(
|
|||||||
}
|
}
|
||||||
"plan" => SlashCommand::Plan { mode: remainder },
|
"plan" => SlashCommand::Plan { mode: remainder },
|
||||||
"review" => SlashCommand::Review { scope: remainder },
|
"review" => SlashCommand::Review { scope: remainder },
|
||||||
|
"team" => SlashCommand::Team { action: remainder },
|
||||||
"tasks" => SlashCommand::Tasks { args: remainder },
|
"tasks" => SlashCommand::Tasks { args: remainder },
|
||||||
"theme" => SlashCommand::Theme { name: remainder },
|
"theme" => SlashCommand::Theme { name: remainder },
|
||||||
"voice" => SlashCommand::Voice { mode: remainder },
|
"voice" => SlashCommand::Voice { mode: remainder },
|
||||||
"usage" => SlashCommand::Usage { scope: remainder },
|
"usage" => SlashCommand::Usage { scope: remainder },
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
"setup" => SlashCommand::Setup,
|
||||||
|
>>>>>>> 2f6a225 (fix: make id field optional in OpenAI response parsing)
|
||||||
"rename" => SlashCommand::Rename { name: remainder },
|
"rename" => SlashCommand::Rename { name: remainder },
|
||||||
"copy" => SlashCommand::Copy { target: remainder },
|
"copy" => SlashCommand::Copy { target: remainder },
|
||||||
"hooks" => SlashCommand::Hooks { args: remainder },
|
"hooks" => SlashCommand::Hooks { args: remainder },
|
||||||
|
|||||||
Reference in New Issue
Block a user