Skip to content

[Provider compatibility] Cloud Code Assist rejects structured output on Gemini models #4669

Description

@agentHits

Client or integration

Codex App

Provider or upstream service

google-antigravity / Cloud Code Assist

OpenCodex version

2.56.0

Endpoint or capability

/v1/responses structured output / text.format

Current behaviour

Inbound requests with response_format / text.format routed to Gemini models on Cloud Code Assist (google-antigravity) are rejected locally with HTTP 400 before reaching the network:

google cloud-code-assist structured output is not implemented by opencodex — remove response_format or route this model through AI Studio or Vertex

Expected behaviour

Gemini models on Cloud Code Assist should accept structured output (json_schema and json_object) using the same generationConfig path as AI Studio and Vertex, placing responseMimeType and responseJsonSchema inside envelope.request.generationConfig. Non-Gemini models on Cloud Code Assist should continue to fail closed with an explicit rejection.

Minimal redacted request or reproduction

# Inbound request to OpenCodex proxy with text.format (structured output) routed to a Gemini model on Cloud Code Assist:
POST /v1/responses
{
  "model": "google-antigravity/gemini-3.8-flash",
  "text": {
    "format": {
      "type": "json_schema",
      "name": "result",
      "schema": {
        "type": "object",
        "properties": { "status": { "type": "string" } },
        "required": ["status"]
      }
    }
  }
}

Actual response or error

HTTP 400

{
  "error": {
    "message": "google cloud-code-assist structured output is not implemented by opencodex — remove response_format or route this model through AI Studio or Vertex"
  }
}

Upstream documentation

Gemini API structured output documentation: https://ai.google.dev/api/generate-content

Cloud Code Assist envelope wraps the Gemini generateContent request under envelope.request.

Suggested mapping or implementation notes

Allow Gemini models (modelId starting with gemini-) on Cloud Code Assist to pass structured output into generationConfig (responseMimeType: "application/json" and responseJsonSchema). The existing compileGoogleWireBody whitelist already allows both keys, carrying them into envelope.request.generationConfig. Non-Gemini models served through Cloud Code Assist should remain explicitly refused.

Additional context and attachments

Observed on OpenCodex 2.56.0 when Codex Desktop helper/worker requests with response_format are routed to google-antigravity/gemini-3.8-flash.

Checks

  • I searched existing provider and compatibility issues.
  • The request and response were redacted.
  • The expected behaviour is based on an upstream specification or a concrete client requirement.

Activity

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

    providerProvider adapters, OpenAI-compat presets, upstream API quirksprovider-compatibilityProvider compatibility reports

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions