Skip to content

feat: support the Decisions API on Azure OpenAI backends - #2977

Open
herewasmike wants to merge 5 commits into
theagentrouter:mainfrom
herewasmike:feat/azure-openai-decisions
Open

herewasmike wants to merge 5 commits into
theagentrouter:mainfrom
herewasmike:feat/azure-openai-decisions

Conversation

@herewasmike

@herewasmike herewasmike commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Description

Update /v1/decisions according to GA Decisions API [1] and adds Azure OpenAI backends [2].

Azure OpenAI: Azure serves the Decisions API on its v1 API at POST /openai/v1/decisions, with the same request and response format as OpenAI.

Question instructions: the GA API lets each question carry its own images by passing instructions as an array of input_text and input_image parts. DecisionQuestion.Instructions was a string, so these
requests failed to parse and the gateway returned 400. It is now kept as raw JSON and redacted with redactRawJSON. OpenInference tracing now applies HideInputImages and
Base64ImageMaxLength to images in question instructions and in function and custom tool outputs, as it already did to images in input message content.

Docs: the Decisions section lists Azure OpenAI and per-question instructions, drops the beta notes, lists hosted HTTP or HTTPS image URLs and JSON content as supported, and keeps file_id inputs as unsupported.

Related Issues/PRs (if applicable)

Related PR: #2819
Related issue: #2821

Special notes for reviewers (if applicable)

  • Not changed here: Responses tracing has the same gap for images in function_call_output, both in the input value and in the per-message attributes, so it is left for a separate PR.
  • I haven't validated it against the real OpenAI/Azure backends

** AI was used to help me produce this change **

** Links **
1: https://developers.openai.com/api/docs/guides/decisions
2: https://learn.microsoft.com/en-us/azure/foundry/openai/how-to/decisions

herewasmike and others added 2 commits November 4, 2026 16:11
Azure OpenAI serves the Decisions API at /openai/v1/decisions. It
uses the same request and response format as OpenAI, reads the
deployment name from the body "model" field, and takes no api-version.
Route AzureOpenAI backends to that path through the existing Decisions
passthrough translator, so schema.Version is not sent for this endpoint.

Also reflect decisions API moving to GA from Beta in docs:
Hosted HTTP or HTTPS image URLs and JSON content are marked supported,
file_id inputs remain unsupported.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Mike Toldov <mike.toldov@datavant.com>
The generally available Decisions API lets each question carry its own
images by passing instructions as an array of input_text and
input_image parts. DecisionQuestion.Instructions was a string, so such
requests failed to parse and the gateway returned 400. Keep it as raw
JSON, as the System One spec does, and redact it with redactRawJSON.

OpenInference tracing applies HideInputImages and Base64ImageMaxLength
to every place a Decisions request can carry images: input messages,
function and custom tool outputs, and question instructions. The image
redaction helper is parameterized by these locations, and Responses
keeps walking only input message content.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Mike Toldov <mike.toldov@datavant.com>
@herewasmike
herewasmike requested a review from a team as a code owner November 4, 2026 15:30
@netlify

netlify Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for theagentrouter ready!

Name Link
🔨 Latest commit a837f39
🔍 Latest deploy log https://app.netlify.com/projects/theagentrouter/deploys/6aee5145f938d9fb08eb8f6b
😎 Deploy Preview https://deploy-preview-2977--theagentrouter.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Nov 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.28571% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...rnal/tracing/openinference/openai/request_attrs.go 93.75% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@herewasmike

Copy link
Copy Markdown
Contributor Author

/retest

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.

1 participant