diff --git a/codex-cli/scripts/install_native_deps.sh b/codex-cli/scripts/install_native_deps.sh index 09c1553228..c1697fb5fe 100755 --- a/codex-cli/scripts/install_native_deps.sh +++ b/codex-cli/scripts/install_native_deps.sh @@ -65,7 +65,7 @@ mkdir -p "$BIN_DIR" # Until we start publishing stable GitHub releases, we have to grab the binaries # from the GitHub Action that created them. Update the URL below to point to the # appropriate workflow run: -WORKFLOW_URL="https://github.com/openai/codex/actions/runs/15280451034" +WORKFLOW_URL="https://github.com/openai/codex/actions/runs/15334411824" WORKFLOW_ID="${WORKFLOW_URL##*/}" ARTIFACTS_DIR="$(mktemp -d)" diff --git a/codex-rs/core/src/chat_completions.rs b/codex-rs/core/src/chat_completions.rs index 7760c48fbf..955f87696b 100644 --- a/codex-rs/core/src/chat_completions.rs +++ b/codex-rs/core/src/chat_completions.rs @@ -25,6 +25,7 @@ use crate::flags::OPENAI_REQUEST_MAX_RETRIES; use crate::flags::OPENAI_STREAM_IDLE_TIMEOUT_MS; use crate::models::ContentItem; use crate::models::ResponseItem; +use crate::openai_tools::create_tools_json; use crate::util::backoff; /// Implementation for the classic Chat Completions API. This is intentionally @@ -56,10 +57,13 @@ pub(crate) async fn stream_chat_completions( } } + let tools_json = create_tools_json(prompt, model)?; + // Rewrite tools to match the chat completions tool call format: + // https://platform.openai.com/docs/guides/function-calling?api-mode=chat let payload = json!({ "model": model, "messages": messages, - "stream": true + "stream": true, }); let base_url = provider.base_url.trim_end_matches('/');