Skip to content

[FEATURE] Support apiFormat responses for AzureOpenAI ModelConfig #2517

Closed

Description

@jeremiedeveloper

📋 Prerequisites

📝 Feature Summary

Add support for selecting the Responses API format in AzureOpenAI ModelConfig resources.

❓ Problem Statement / Motivation

The OpenAI provider already supports selecting the API format through the
apiFormat field:

  • chatCompletions by default
  • responses for the OpenAI Responses API

However, the AzureOpenAI provider does not currently expose this option.
AzureOpenAI ModelConfigs always use the deployments-based Chat Completions
endpoint.

This prevents users from configuring Azure OpenAI deployments that support the
Responses API, including newer reasoning models and Azure OpenAI v1 endpoints.

PR #2369 introduced Responses API support for the OpenAI provider and the kagent
harness. However, that PR did not add the apiFormat option to AzureOpenAI
ModelConfigs. This issue proposes extending the same capability to the
AzureOpenAI provider.

💡 Proposed Solution

Proposed Solution

Add an optional apiFormat field to the AzureOpenAI configuration in the kagent.dev/v1alpha3 ModelConfig API.

Supported values should be:

  • chatCompletions: the default, preserving the current behavior
  • responses: use the Azure OpenAI Responses API

Expected behavior:

For chatCompletions, keep the current endpoint:

/openai/deployments/{deployment}/chat/completions?api-version={apiVersion}

For responses, use the Azure OpenAI v1 endpoint:

/openai/v1/responses

In Responses mode:

  • the deployment name is sent as the model value in the request body;
  • the api-version query parameter is not used;
  • existing API key authentication remains supported;
  • API key passthrough remains supported;
  • Azure identity authentication remains supported;
  • existing TLS configuration remains supported;
  • Azure embeddings continue to use the existing deployments-based endpoint;
  • existing Chat Completions configurations remain backward compatible.

The new setting must be propagated through the complete model configuration pipeline, including the Kubernetes API type, generated CRDs, standard translator, v2 translator, ADK model configuration, and Azure OpenAI runtime client.

The implementation should include unit tests covering:

  • chatCompletions routing;
  • responses routing;
  • the /openai/v1/responses endpoint;
  • the absence of the api-version query parameter in Responses mode;
  • propagation of the value through the translators;
  • rejection of unsupported apiFormat values by CRD validation.

The new field should be added only to the current v1alpha3 API. The legacy v1alpha1 and v1alpha2 APIs must remain unchanged.

Generated CRD manifests and the Helm CRD copy should be updated accordingly. Relevant documentation should include an example AzureOpenAI ModelConfig using apiFormat: responses.

🔄 Alternatives Considered

Users can currently use AzureOpenAI only through the existing Chat Completions
endpoint. Configuring the Responses API through a generic OpenAI-compatible
provider is not equivalent because Azure authentication, deployment routing,
API version handling, and Azure-specific endpoint construction differ.

Another option would be to add a separate Azure Responses provider, but this
would duplicate the existing AzureOpenAI configuration and would make the
provider model unnecessarily more complex.

🎯 Affected Service(s)

Multiple services / System-wide

📚 Additional Context

Related PR:

PR #2369 added the shared Responses API handling for the OpenAI provider, but
the apiFormat option was not added to the AzureOpenAI ModelConfig. This issue
covers the missing AzureOpenAI configuration and endpoint routing support.

Azure OpenAI Responses API documentation:

https://learn.microsoft.com/en-us/azure/ai-foundry/openai/how-to/responses

🙋 Are you willing to contribute?

  • I am willing to submit a PR for this feature

Activity

  1. jeremiedeveloper commented on Aug 29, 2026

    @jeremiedeveloper
    Author

    I’ve opened a PR that implements apiFormat: chatCompletions | responses on v1alpha3 ModelConfig (Azure OpenAI Chat Completions vs Responses API), including Go/Python ADK, Helm, docs, and tests.

    PR: #2626

  2. EItanya commented on Oct 16, 2026

    @EItanya
    Contributor

    Implemented on main in #3143. Azure OpenAI ModelConfigs now support apiFormat: responses, with requests routed to /openai/v1/responses. Closing this as completed.

    🤖 AI-assisted triage.

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

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions