chore: update GitHub workflow for native artifacts for npm release

This commit is contained in:
Michael Bolin
2025-05-29 15:27:20 -07:00
parent a32d305ae6
commit 173374e376
2 changed files with 6 additions and 2 deletions

View File

@@ -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)"

View File

@@ -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('/');