Azure-Samples / Azure-Samples/ai-model-start
o4-mini: reasoning.summary parameter blocked by upstream OpenAI organization verification
- Dominant language
- Bicep
- Stars
- 3
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
### Summary
When calling `o4-mini` via the Responses API on a Foundry project endpoint with `reasoning={"summary": "auto"}` (or `"concise"` / `"detailed"`), the request fails with HTTP 400 and an OpenAI-style error message asking the *organization* to be verified:
```
BadRequestError: Error code: 400 - {'error': {'message': 'Your organization must
be verified to generate reasoning summaries. Please go to:
https://platform.openai.com/settings/organization/general and click on Verify
Organization. If you just verified, it can take up to 15 minutes for access to
propagate.', 'type': 'invalid_request_error', 'param': 'reasoning.summary',
'code': 'unsupported_value'}}
```
This error comes from upstream OpenAI infrastructure — but from a Foundry customer's perspective it's surfaced through their Foundry project endpoint with no clear remediation path, since they don't have access to a `platform.openai.com` organization to verify.
### Reproduction
```python
from azure.identity import DefaultAzureCredential, get_bearer_token_provider
from openai import OpenAI
endpoint = ""
client = OpenAI(
base_url=endpoint.rstrip("/") + "/openai/v1",
api_key=get_bearer_token_provider(DefaultAzureCredential(), "https://ai.azure.com/.default"),
)
# Works — emits reasoning item with reasoning_tokens > 0, but summary[].text is empty
r = client.responses.create(
model="o4-mini",
input="What's heavier: a pound of feathers or a pound of bricks? Think step by step.",
max_output_tokens=2000,
)
print(r.usage.output_tokens_details.reasoning_tokens) # >0
for item in r.output:
if item.type == "reasoning":
print([s.text for s in item.summary]) # ['']
# Fails — HTTP 400 'organization must be verified'
r = client.responses.create(
model="o4-mini",
input="...",
max_output_tokens=2000,
reasoning={"summary": "auto"},
)
```
### Observed behavior
- Default request (no `reasoning` param): `o4-mini` emits a structured `reasoning` output item with `reasoning_tokens > 0` reliably, **but** `summary[].text` is empty
- Adding `reasoning={"summary": "auto"|"concise"|"detailed"}`: HTTP 400 with the org-verification message above
### Expected behavior
- Either (a) summary text should be returned by default for verified Foundry deployments without requiring `platform.openai.com` org verification, or (b) the README/docs/examples should document the constraint and a remediation path
- The error message, when shown via Foundry, should point at a Foundry/Azure remediation flow rather than `platform.openai.com` which Foundry customers may not have access to
### Impact
- Customers using OpenAI reasoning models (`o4-mini`, presumably `o4`, `o3`, etc.) through Foundry can't surface reasoning summaries to end users, even though Foundry is billing them for the reasoning tokens
- The error message is misleading in a Foundry context — customers may have no way to "verify their organization" at `platform.openai.com`
- Templates that surface reasoning summaries (like #11) work for non-OpenAI reasoning models but silently come back with empty summaries for o-series models — confusing for demo authors
### Suggested fix
Either:
1. Treat verified Foundry resources as implicitly org-verified for reasoning summary access
2. Surface a Foundry-specific error message pointing to docs that explain the constraint
3. Document the constraint clearly in the README / known issues so customers don't burn time investigating
### Environment
- Foundry account in East US 2
- `o4-mini` deployment, version `2025-04-16`
- `openai==2.36.0`, `azure-identity==1.x`
- Project endpoint, `/openai/v1` base URL, EntraID `DefaultAzureCredential` with `https://ai.azure.com/.default` scope
### Cross-reference
PR #11 surfaces reasoning summaries across all 5 language examples. The current behavior means OpenAI reasoning models silently return empty summary text through the universal pattern, which is acceptable but worth documenting.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.