Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion codex-cli/src/utils/get-api-key.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ async function maybeRedeemCredits(
? "https://api.openai.com"
: "https://api.openai.org";

const redeemRes = await fetch(`${apiHost}/v1/billing/redeem_credits`, {
const redeemRes = await fetch(`${apiHost}/billing/redeem_credits`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ id_token: currentIdToken }),
Expand Down
4 changes: 2 additions & 2 deletions codex-rs/core/src/model_provider_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ use crate::openai_api_key::get_openai_api_key;
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum WireApi {
/// The experimental Responses API exposed by OpenAI at `/v1/responses`.
/// The experimental "Responses" API exposed by OpenAI at `/responses`.
#[default]
Responses,
/// Regular Chat Completions compatible with `/v1/chat/completions`.
/// Regular Chat Completions compatible with `/chat/completions`.
Chat,
}

Expand Down
2 changes: 1 addition & 1 deletion codex-rs/core/src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub enum ResponseItem {
call_id: String,
},
// NOTE: The input schema for `function_call_output` objects that clients send to the
// OpenAI /v1/responses endpoint is NOT the same shape as the objects the server returns on the
// OpenAI /responses endpoint is NOT the same shape as the objects the server returns on the
// SSE stream. When *sending* we must wrap the string output inside an object that includes a
// required `success` boolean. The upstream TypeScript CLI does this implicitly. To ensure we
// serialize exactly the expected shape we introduce a dedicated payload struct and flatten it
Expand Down
2 changes: 1 addition & 1 deletion codex-rs/core/tests/live_cli.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![expect(clippy::expect_used)]

//! Optional smoke tests that hit the real OpenAI /v1/responses endpoint. They are `#[ignore]` by
//! Optional smoke tests that hit the real OpenAI /responses endpoint. They are `#[ignore]` by
//! default so CI stays deterministic and free. Developers can run them locally with
//! `cargo test --test live_cli -- --ignored` provided they set a valid `OPENAI_API_KEY`.

Expand Down
4 changes: 2 additions & 2 deletions codex-rs/core/tests/previous_response_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ async fn keeps_previous_response_id_between_tasks() {
.set_body_raw(sse_completed("resp1"), "text/event-stream");

Mock::given(method("POST"))
.and(path("/v1/responses"))
.and(path("/responses"))
.and(NoPrevId)
.respond_with(first)
.expect(1)
Expand All @@ -84,7 +84,7 @@ async fn keeps_previous_response_id_between_tasks() {
.set_body_raw(sse_completed("resp2"), "text/event-stream");

Mock::given(method("POST"))
.and(path("/v1/responses"))
.and(path("/responses"))
.and(HasPrevId)
.respond_with(second)
.expect(1)
Expand Down
2 changes: 1 addition & 1 deletion codex-rs/core/tests/stream_no_completed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ async fn retries_on_early_close() {
}

Mock::given(method("POST"))
.and(path("/v1/responses"))
.and(path("/responses"))
.respond_with(SeqResponder {})
.expect(2)
.mount(&server)
Expand Down
2 changes: 1 addition & 1 deletion codex-rs/login/src/login_with_chatgpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ def maybe_redeem_credits(
try:
redeem_payload = json.dumps({"id_token": id_token}).encode()
req = urllib.request.Request(
url=f"{api_host}/v1/billing/redeem_credits",
url=f"{api_host}/billing/redeem_credits",
data=redeem_payload,
method="POST",
headers={"Content-Type": "application/json"},
Expand Down