Skip to content

fix(azureopenai): raise reasoning-model probe budget - #525

Merged
Finesssee merged 1 commit into
mainfrom
codex/fix-issue-524-azure-probe-budget
Sep 18, 2026
Merged

Finesssee merged 1 commit into
mainfrom
codex/fix-issue-524-azure-probe-budget

Conversation

@Finesssee

@Finesssee Finesssee commented Sep 17, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Azure OpenAI reasoning models reject the liveness probe when it sends max_completion_tokens=1 (or legacy max_tokens=1) with HTTP 400, even though a small positive budget succeeds.

Fix

Raise the probe budget to 16 for both request formats. The probe remains liveness-only and continues to parse only the returned model identity.

Validation

  • Focused Azure tests: 6 passed
  • Shared Rust manifest: 1,845 passed, 1 ignored
  • Tauri Rust manifest: 432 passed
  • Both clippy commands with -D warnings
  • cargo fmt --all -- --check
  • git diff --check

Fixes #524

Summary by CodeRabbit

  • Bug Fixes
    • Azure OpenAI validation requests now allow up to 16 completion tokens, improving compatibility with validation responses.
    • Validation succeeds when the response includes only the model identifier.

@coderabbitai

coderabbitai Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: e723ec6a-3fee-4844-9aca-46cb6a37697f

📥 Commits

Reviewing files that changed from the base of the PR and between f259abe and bc8be96.

📒 Files selected for processing (1)
  • rust/src/providers/azureopenai.rs

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The Azure OpenAI validation request now allocates 16 tokens instead of 1. Tests cover both API-version branches and successful responses containing only a model field.

Changes

Azure OpenAI validation

Layer / File(s) Summary
Validation budget and response parsing
rust/src/providers/azureopenai.rs
validation_body now sets max_completion_tokens or max_tokens to 16. Tests verify both branches and deserialization of a response containing only model.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to bc8be

The probe uses the intended positive budget while preserving model-identity parsing, with no identified merge-blocking risk.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: increasing the Azure OpenAI reasoning-model probe budget.
Linked Issues check ✅ Passed Issue #524 requires a small positive output budget for both Azure OpenAI request formats and preservation of liveness-only behavior and model parsing. The change sets max_completion_tokens to 16 for…
Out of Scope Changes check ✅ Passed The diff is limited to the Azure OpenAI validation budgets and focused unit tests in rust/src/providers/azureopenai.rs. These changes directly support issue #524 and do not show unrelated behavior o…
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Finesssee

Copy link
Copy Markdown
Collaborator Author

Thermo-nuclear code-quality review

Scope: PR #525, head bc8be96f77d129f95f4133361dd5f1b851a16ca3, against current main f259abe8123665f85e74977ea0f285e8bafefa27.

Receipt: No high-confidence finding. The one-file provider-local diff raises both existing validation budgets from 1 to 16 and adds focused coverage for both request shapes and model-only responses. It introduces no new branching, abstraction boundary, duplicate helper, or file-size regression.

@Finesssee
Finesssee force-pushed the codex/fix-issue-524-azure-probe-budget branch from bc8be96 to 82f3fd6 Compare September 18, 2026 12:02
@Finesssee
Finesssee merged commit b261cd3 into main Sep 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Azure OpenAI: probe fails on reasoning models (gpt-5.4-mini) - max_completion_tokens=1 always returns HTTP 400

1 participant