Skip to content

fix: rename is_azure_responses_wire_base_url to is_azure_responses_provider#17965

Merged
bolinfest merged 1 commit intomainfrom
pr17965
Apr 15, 2026
Merged

fix: rename is_azure_responses_wire_base_url to is_azure_responses_provider#17965
bolinfest merged 1 commit intomainfrom
pr17965

Conversation

@bolinfest
Copy link
Copy Markdown
Collaborator

@bolinfest bolinfest commented Apr 15, 2026

Why

While reviewing #17958, the helper name is_azure_responses_wire_base_url looked misleading because the helper returns true for either the azure provider name or an Azure Responses base_url. The new name makes both inputs part of the contract.

What

  • Rename is_azure_responses_wire_base_url to is_azure_responses_provider.
  • Move the openai.azure. marker into matches_azure_responses_base_url so all base URL marker matching is centralized.
  • Keep Provider::is_azure_responses_endpoint() behavior unchanged.

Verification

  • Compared the parent and current implementations. name.eq_ignore_ascii_case("azure") still returns true before consulting base_url, None still returns false, base URLs are still lowercased before marker matching, and the same Azure marker set is checked.
  • Ran cargo test -p codex-api.

@bolinfest bolinfest requested a review from sayan-oai April 15, 2026 17:30
Comment thread codex-rs/codex-api/src/provider.rs Outdated
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you also unify base.contains("openai.azure and matches_azure_responses_base_url

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call: fixed!

@bolinfest bolinfest enabled auto-merge (squash) April 15, 2026 17:45
@bolinfest bolinfest disabled auto-merge April 15, 2026 18:07
@bolinfest bolinfest merged commit aca781b into main Apr 15, 2026
38 of 39 checks passed
@bolinfest bolinfest deleted the pr17965 branch April 15, 2026 18:08
@github-actions github-actions bot locked and limited conversation to collaborators Apr 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants