Skip to content

[DOCS] Document the new POST /v1/decisions endpoint (OpenAI Decisions API relay) #1086

Closed

Description

@inference-gateway-maintainer

Summary

The gateway gains a new public endpoint, POST /v1/decisions, relaying the OpenAI Decisions API (https://developers.openai.com/api/docs/guides/decisions) byte-for-byte to the OpenAI provider, the same way /v1/responses works. Gateway issue: inference-gateway/inference-gateway#816. Gateway PR: see the linked PR on that issue (branch feat/issue-816-20261103-1623). Schema change: inference-gateway/schemas#298.

Behaviour to document:

  • Only the OpenAI provider supports it today. Other providers return 400 with The Decisions API is not supported by this provider yet.
  • The model field uses the usual provider/model prefix (openai/gpt-6-luna) or the ?provider=openai query parameter. The prefix is stripped before forwarding, everything else in the body passes through untouched.
  • Model allow/deny lists and the request body size limit apply as for /v1/responses.
  • No streaming, no MCP tool injection, no guardrails changes.

Acceptance Criteria

  • The API reference / endpoints page lists POST /v1/decisions with a curl example (one predicate question against openai/gpt-6-luna)
  • The provider support matrix marks Decisions as OpenAI-only
  • The unsupported-provider 400 message is documented

Activity

  1. added
    documentation
    on Nov 3, 2026
  2. inference-gateway-maintainer commented on Nov 3, 2026

    @inference-gateway-maintainer
    ContributorAuthor

    The schemas-side spec for this landed in inference-gateway/schemas#299 (adds POST /decisions, CreateDecisionRequest, DecisionQuestion, Decision and the openai endpoint config), so the generated API reference will pick it up after the next schemas release.

  3. edenreich commented on Nov 3, 2026

    @edenreich
    Contributor

    @claude can you document this?

  4. added theissue type on Nov 3, 2026
  5. inference-gateway-maintainer commented on Nov 3, 2026

    @inference-gateway-maintainer
    ContributorAuthor

    Claude finished @edenreich's task in 3m 35s —— View job • docs/issue-1086-20261103-1801 • [Create PR ➔](https://github.com/inference-gateway/docs/compare/main...docs/issue-1086-20261103-1801?quick_pull=1&title=Issue%20%231086%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%231086%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)


    Documented POST /v1/decisions

    • Gather context (api-reference.md, supported-providers.md, gateway branch feat/issue-816-20261103-1623)
    • Add POST /v1/decisions to the API reference with a curl example
    • Mark Decisions as OpenAI-only in the provider support matrix
    • Document the unsupported-provider 400 message
    • Run lint:md, format:check, build, bun test (all pass)
    • Commit and open PR

    PR: #1087

    What changed

    api-reference.md - new "Decisions API" section between Responses and Images:

    • POST /v1/decisions?provider={provider}, body relayed byte-for-byte with only the model prefix stripped
    • the three DecisionQuestion types (predicate, choice, score)
    • a curl example with one predicate question against openai/gpt-6-luna, plus the Decision response shape
    • no streaming, no MCP tool injection
    • allow/deny lists and the body size limit behave as for /v1/responses (403 / 413)
    • the unsupported-provider 400 with the verbatim The Decisions API is not supported by this provider yet.

    supported-providers.md - a note under the provider matrix marking the Responses and Decisions APIs as OpenAI-only, with that 400 message. The matrix table itself is generated from the schema, so the note sits in the hand-written prose directly below it rather than hand-editing a GENERATED:* block.

    Examples and the error string come from the gateway implementation (api/routes.go DecisionsHandler -> proxyJSONBody, and tests/api_decisions_test.go), not invented. No generator change was needed: the generated schema sections will pick up CreateDecisionRequest / DecisionQuestion / Decision after the next schemas release.

    Skipped: no SDK docs update in sdks.md (no SDK method for decisions exists yet) and no new column in the generated provider matrix (that would need a scripts/generate-provider-docs.mjs change plus fixture updates - worth doing if you want Decisions tracked per-provider as the second provider lands). Risk: the ?provider= form and the choice/score question types are documented from the gateway source and schema types, not from a live request.
    | Branch

  6. moved this from Todo to In progress in 2026on Nov 3, 2026
  7. moved this from In progress to QA in 2026on Nov 3, 2026
  8. moved this from QA to Done in 2026on Nov 3, 2026
  9. inference-gateway-releaser commented on Nov 8, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.9.24 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationreleased

    Type

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions