---
title: "AISIX 1.12.0: Bring Gemini Clients to Gateway-Managed Models - API7.ai"
description: "Use Gemini generation with AISIX model aliases, choose native Gemini or a Chat Completions bridge, and verify the path before rollout."
url: "https://api7.ai/blog/aisix-1-12-0-gemini-client-model-aliases"
---

[Blog](https://api7.ai/blog)

[Products](https://api7.ai/category/products)[Technology](https://api7.ai/category/technology)[Ecosystem](https://api7.ai/category/ecosystem)[Case Study](https://api7.ai/category/usercase)[Team & Community](https://api7.ai/category/community)

Search

⌘ + K

[Blog](https://api7.ai/blog)

Products

# AISIX 1.12.0: Bring Gemini Clients to Gateway-Managed Models

November 26, 2026

[Products](https://api7.ai/category/products)

An application that speaks Gemini's generation protocol should not need a second client implementation just to reach a different model backend. [AISIX 1.12.0](https://docs.api7.ai/ai-gateway/release-notes#1120), released November 26, 2026, adds a gateway entry point for that decision: Gemini clients address an AISIX model alias, and the gateway uses either a native Gemini target or a supported Chat Completions bridge.

Consider an engineering team whose application summarizes deployment checklists. The team wants to evaluate Google AI Studio alongside an existing Chat Completions backend while keeping its Gemini request format. The new route separates the application's protocol from the administrator's upstream choice. It does not make those backends equivalent in model behavior or supported options.

We verified both paths with the official AISIX 1.12.0 gateway and simulated upstreams:

| Caller operation                | AISIX alias        | Recorded upstream path                                     | Observed result  |
| ------------------------------- | ------------------ | ---------------------------------------------------------- | ---------------- |
| `generateContent`               | `native-assistant` | `/v1beta/models/gemini-demo:generateContent`               | 200, Gemini JSON |
| `streamGenerateContent?alt=sse` | `native-assistant` | `/v1beta/models/gemini-demo:streamGenerateContent?alt=sse` | 200, SSE         |
| `generateContent`               | `bridge-assistant` | `/v1/chat/completions`                                     | 200, Gemini JSON |
| `streamGenerateContent?alt=sse` | `bridge-assistant` | `/v1/chat/completions`                                     | 200, Gemini SSE  |

These are real gateway responses and recorded fixture requests. The providers, answers and token counts were simulated. This protocol workflow is demonstrated through configuration, requests and results rather than a dashboard screenshot; it does not establish real-provider compatibility, model quality, costs or budget enforcement.

## Keep the Client Protocol, Choose the Upstream Deliberately

A client sends `POST /v1beta/models/{alias}:generateContent` for JSON or `POST /v1beta/models/{alias}:streamGenerateContent?alt=sse` for streaming. AISIX also accepts the enterprise-shaped prefix `/v1beta1/projects/{project}/locations/{location}/publishers/google/models/{alias}` with those actions. The name in the path resolves to an AISIX alias, and the caller key must have access to it.

For the checklist application, `native-assistant` points to the simulated Gemini model `gemini-demo`; `bridge-assistant` points to `chat-demo`. Production aliases should point to model IDs actually available through the selected provider credential.

The two paths have different contracts:

- **Native Gemini:** a qualifying provider key declares `apis.gemini`. AISIX uses the native generation endpoint, retaining native candidate, tool-history, thought-signature and usage fields. Policy processing can modify readable content; this is not a promise of byte-for-byte passthrough.
- **Chat Completions bridge:** AISIX translates Gemini contents into a Chat Completions request and converts the response back. The target must use a supported `openai` or `azure-openai` wire adapter. A provider label or generic tool capability alone does not establish compatibility with the client's requested fields.

The [Gemini provider guide](https://docs.api7.ai/ai-gateway/providers/gemini) explains Google AI Studio setup. For Antigravity CLI, use the version-specific [integration guide](https://docs.api7.ai/ai-gateway/integrations/coding-agents/antigravity), including its client settings and tool-round-trip checks. Our local capture used HTTP requests, not an Antigravity session.

## Make the Native Declaration and Alias Visible

In AISIX OSS, the provider key's native declaration and the model's provider-key reference are explicit. This excerpt from the verified demo shows the native half; the full resources file also needs caller-key and other model entries:

```
_format_version: '2'
provider_keys:
  - id: 00000000-0000-4000-8000-000000001121
    display_name: native-provider
    provider: google
    adapter: openai
    api_key: simulated-provider-key
    api_base: http://host.docker.internal:19812/v1beta/openai
    apis:
      gemini:
        base: http://host.docker.internal:19812/v1beta
models:
  - id: 00000000-0000-4000-8000-000000001123
    display_name: native-assistant
    provider: google
    model_name: gemini-demo
    provider_key_id: 00000000-0000-4000-8000-000000001121
```

The HTTP address is an isolated fixture, not a production Google endpoint. Use the official provider guide for production credentials and roots. The demo's separate OpenAI provider key omitted `apis.gemini` and used `/v1` as its Chat Completions base. Validate the complete format-2 file before starting the gateway; our five-resource file passed `aisix validate`.

AISIX Enterprise and AISIX Cloud share this gateway runtime and add their control plane. At the official Google endpoint, the 1.12 control plane supplies the native declaration when `apis` is omitted. An explicit value, including `{}`, takes precedence. Custom endpoints require an explicit versioned native root. After upgrading all control-plane replicas, inspect an official Google key that still lacks `apis`; PATCH it with only its current `display_name` to restore the catalog settings. OSS file configuration needs its own explicit declaration.

## Verify the Boundary from Request to Result

After provisioning the two aliases and granting the caller key access, the checklist application can send the same body to either alias. Set `AISIX_PROXY` to your gateway origin and `AISIX_API_KEY` to its caller key:

```
curl -sS "$AISIX_PROXY/v1beta/models/native-assistant:generateContent" \
  -H "x-aisix-api-key: $AISIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contents":[{"role":"user","parts":[{"text":"Summarize the deployment checklist."}]}]}'
```

Our native request returned the following shortened response:

```
{
  "candidates": [{
    "content": {"role": "model", "parts": [{"text": "Demo answer from native Gemini fixture."}]},
    "finishReason": "STOP",
    "index": 0
  }],
  "usageMetadata": {"promptTokenCount": 12, "candidatesTokenCount": 6, "totalTokenCount": 18}
}
```

The fixture supplied these counts; they are not measured model consumption. Changing the alias to `bridge-assistant` produced Gemini-shaped output while the fixture recorded a Chat Completions request with `model: chat-demo`. For streaming, use `curl -N` and the suffix `:streamGenerateContent?alt=sse`. Both streams completed with Gemini SSE frames. Omitting `alt=sse` returned 400 `INVALID_ARGUMENT` before the upstream, and an invalid gateway key returned 401 `UNAUTHENTICATED`; neither added an upstream request in this capture.

Check the actual upstream log during acceptance testing. An existing explicitly matching Gemini passthrough route takes precedence over this generation route. Its behavior must be evaluated as passthrough. In a routing plan, AISIX filters incompatible targets. A native target in the plan, or removal of an incompatible target, bypasses the chat response cache; a purely compatible Chat bridge plan can still use it where otherwise eligible.

A successful stream is also different from an interrupted one. After response headers, an upstream error can arrive in-band; a 200 header does not establish completed delivery. Gateway accounting can retain reported counts or estimate missing ones after partial delivery, and even a polled stream delivering no SSE events can retain or estimate prompt tokens. Inspect terminal logs and usage records rather than assuming a failed stream costs zero. Gateway records do not establish the provider's charge, budget-rollup timing or dashboard freshness.

## Plan the Upgrade Beyond This Client Workflow

The release contains separate operational changes. They are not consequences of enabling Gemini generation:

- **Cache and usage:** changed Redis fingerprints cause warmup and temporarily higher upstream traffic. Mixed gateway versions treat missing and explicit-zero counts differently. Consumers of estimated usage events must accept `total_tokens: null` in JSON or an empty CSV cell; avoid counting reasoning twice when completion already includes it.
- **Routing and calendars:** upgrade affected gateways to 1.12.0 before Gemini Decision routing. Upgrade control-plane replicas and affected gateways before enabling non-UTC budget calendars; incompatible supported gateways can make saves return `422 DP_INCOMPATIBLE`. A rolled-back gateway without the classifier skips that router. Clients deserializing classifier types into a closed enum must accept `gemini_decision`.
- **Historical reporting:** semantic-routing attribution backfill is bounded by retained evidence and the applicable window; records outside it retain their attribution. Consumers must handle `backfill_in_progress`, selected-target attribution, new CSV columns before the final `currency` column, and previously absent fields. Update queries and parse by headers.
- **Recovery:** back up PostgreSQL before the control-plane upgrade; rollback requires restoring that backup. Older logical backups without the budget-history identifier can leave some restored usage uncounted. Import organization bundles only into a matching version and schema fingerprint.
- **Path matching:** Fun-ASR now takes precedence over path-only passthrough rules at `/api-ws/v1/inference`; move an ordinary-HTTP rule or match `Host` explicitly. Upstreams matching raw paths must accept literal `^` forwarded as `%5E`.
- **Admin API writes:** new or renamed rate-limit policies share an environment-wide, case-sensitive namespace. Keep an existing duplicate name unchanged or omit it on update; names are limited to 100 Unicode characters, including trailing spaces. Use a Chat Completions-capable model for chat targets rather than `gemini-decision-1`, and disable its background check in the same update when required. Review the exact grandfathering and error contracts in the release notes.

Start with one alias and verify regular output, streaming termination and the selected upstream before expanding access. Use the [AISIX OSS quickstart](https://docs.api7.ai/ai-gateway/getting-started/gateway-quickstart) to prepare the gateway, then follow the [1.12.0 release notes](https://docs.api7.ai/ai-gateway/release-notes#1120) for deployment-specific upgrade actions. [AISIX](https://api7.ai/ai-gateway) can provide the gateway boundary; the chosen adapter, model and client still determine the application's supported behavior.

Tags:

[AISIX](https://api7.ai/tags/aisix)

[AI Gateway](https://api7.ai/tags/ai-gateway)

Share article link

Share

Related Posts

[![AISIX 1.8.0: Keep Budget Decisions Local During Control-Plane Outages](https://static.api7.ai/uploads/2026/11/26/XbgyaY5o_aisix-1-8-0-local-budget-decisions.webp)](https://api7.ai/blog/aisix-1-8-0-local-budget-decisions)

## [AISIX 1.8.0: Keep Budget Decisions Local During Control-Plane Outages](https://api7.ai/blog/aisix-1-8-0-local-budget-decisions)

[![AISIX 1.7.1: Make Cross-Provider Stream Usage an Explicit Contract](https://static.api7.ai/uploads/2026/11/26/xCF7gEgZ_aisix-1-7-1-stream-usage-contract.webp)](https://api7.ai/blog/aisix-1-7-1-stream-usage-contract)

## [AISIX 1.7.1: Make Cross-Provider Stream Usage an Explicit Contract](https://api7.ai/blog/aisix-1-7-1-stream-usage-contract)

Table of Contents

- [Keep the Client Protocol, Choose the Upstream Deliberately](#keep-the-client-protocol-choose-the-upstream-deliberately)
- [Make the Native Declaration and Alias Visible](#make-the-native-declaration-and-alias-visible)
- [Verify the Boundary from Request to Result](#verify-the-boundary-from-request-to-result)
- [Plan the Upgrade Beyond This Client Workflow](#plan-the-upgrade-beyond-this-client-workflow)

## Related Posts

[![AISIX 1.11.0: Migrate File-Based Gateway Configuration Safely](https://static.api7.ai/uploads/2026/11/24/b8SCADQk_aisix-1-11-0-file-configuration-migration.webp)](https://api7.ai/blog/aisix-1-11-0-file-configuration-migration)

Products

November 20, 2026

#### [AISIX 1.11.0: Migrate File-Based Gateway Configuration Safely](https://api7.ai/blog/aisix-1-11-0-file-configuration-migration)

Discover how AISIX 1.11.0 makes file-based configuration easier to migrate, validate, and troubleshoot before rollout.

[AISIX](https://api7.ai/tags/aisix)

[AI Gateway](https://api7.ai/tags/ai-gateway)

[![AISIX 1.10.0: Keep AI Coding Sessions on a Matched Semantic Route](https://static.api7.ai/uploads/2026/11/13/5rPD4mvs_aisix-1-10-0-semantic-routing-session-affinity.webp)](https://api7.ai/blog/aisix-1-10-0-semantic-routing-session-affinity)

Products

November 12, 2026

#### [AISIX 1.10.0: Keep AI Coding Sessions on a Matched Semantic Route](https://api7.ai/blog/aisix-1-10-0-semantic-routing-session-affinity)

AISIX 1.10.0 brings semantic routing to Messages and Responses APIs, model-group targets, and optional session affinity for supported AI coding and agent sessions.

[AISIX](https://api7.ai/tags/aisix)

[AI Gateway](https://api7.ai/tags/ai-gateway)

[Semantic Routing](https://api7.ai/tags/semantic-routing)

[![AISIX 1.9.0: Connect MCP Users with Their Own Upstream Authorization](https://static.api7.ai/uploads/2026/11/12/HBiZRdR1_aisix-1-9-0-per-user-mcp-oauth.webp)](https://api7.ai/blog/aisix-1-9-0-per-user-mcp-oauth)

Products

November 6, 2026

#### [AISIX 1.9.0: Connect MCP Users with Their Own Upstream Authorization](https://api7.ai/blog/aisix-1-9-0-per-user-mcp-oauth)

AISIX 1.9.0 adds per-user upstream MCP OAuth, allowing users to authorize an upstream service from their MCP client while AISIX manages the upstream credentials.

[AISIX](https://api7.ai/tags/aisix)

[AI Gateway](https://api7.ai/tags/ai-gateway)

[MCP](https://api7.ai/tags/mcp)
