Add exec output-schema parameter (#4079)

Adds structured output to `exec` via the `--structured-output`
parameter.
This commit is contained in:
pakrym-oai
2025-09-23 13:59:16 -07:00
committed by GitHub
parent 0f9a796617
commit fdb8dadcae
15 changed files with 341 additions and 7 deletions

View File

@@ -35,6 +35,12 @@ pub(crate) async fn stream_chat_completions(
client: &reqwest::Client,
provider: &ModelProviderInfo,
) -> Result<ResponseStream> {
if prompt.output_schema.is_some() {
return Err(CodexErr::UnsupportedOperation(
"output_schema is not supported for Chat Completions API".to_string(),
));
}
// Build messages array
let mut messages = Vec::<serde_json::Value>::new();