Repository navigation
feat: support the Decisions API on Azure OpenAI backends - #2977
Open
herewasmike wants to merge 5 commits into
Open
herewasmike wants to merge 5 commits into
herewasmike wants to merge 5 commits into
Conversation
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>
✅ Deploy Preview for theagentrouter ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Contributor
Author
|
/retest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Update
/v1/decisionsaccording 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
instructionsas an array ofinput_textandinput_imageparts.DecisionQuestion.Instructionswas a string, so theserequests failed to parse and the gateway returned 400. It is now kept as raw JSON and redacted with
redactRawJSON. OpenInference tracing now appliesHideInputImagesandBase64ImageMaxLengthto images in question instructions and in function and custom tool outputs, as it already did to images ininputmessage 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_idinputs as unsupported.Related Issues/PRs (if applicable)
Related PR: #2819
Related issue: #2821
Special notes for reviewers (if applicable)
function_call_output, both in the input value and in the per-message attributes, so it is left for a separate PR.** 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