gpt2giga CLI

An ai-forever proxy that serves GigaChat through OpenAI, Anthropic and Gemini APIs so Claude Code, Codex and Gemini CLI can run on it

CLIOfficial

Broad access

Why this level

  • Stores GigaChat credentials and sends the agent's code and session context to GigaChat
  • Client key authorization is off by default, and DEV mode exposes /docs and the /logs endpoints
All reasons and checks
Russian stack

ai-forever/gpt2giga

Install

Services

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/gpt2giga

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • Stores GigaChat credentials and sends the agent's code and session context to GigaChat
  • Client key authorization is off by default, and DEV mode exposes /docs and the /logs endpoints

This is third-party code. Review the repository files before installing.

What it does

gpt2giga is a FastAPI server that accepts OpenAI, Anthropic and Gemini requests and turns them into GigaChat API calls. For OpenAI it serves /chat/completions, /responses, /embeddings and the model list, for Anthropic /messages and /messages/count_tokens, for Gemini generateContent, streamGenerateContent, countTokens and embedContent. The proxy maps tool calls, structured output, images and SSE streaming, drops unsupported optional fields and keeps the client key separate from GigaChat credentials. It listens on http://localhost:8090 by default, and the /v1 or /v2 path selects the GigaChat v1 or v2 contract.

Who it is for. For developers and teams who need to run Claude Code, Codex, Gemini CLI or their own OpenAI and Anthropic SDK code on GigaChat.

Good fit when

  • You want to run Claude Code or Codex on GigaChat-2-Max or GigaChat-3-Ultra
  • Existing OpenAI, Anthropic or Gemini SDK code should switch to GigaChat by changing base_url
  • You need a shared GigaChat gateway for a team with its own API key and docs closed in PROD mode

Not a fit when

  • You need OpenAI, Anthropic or Gemini Files or Batches APIs: the proxy disables them until GigaChat supports them
  • You need audio, image generation and editing, fine-tuning or Assistants: these are out of the project's scope

Example request

Start gpt2giga with my GigaChat key and connect Claude Code to it on the GigaChat-2-Max model

Limitations

Requires GigaChat credentials (GIGACHAT_CREDENTIALS) and an account scope such as GIGACHAT_API_PERS. Python 3.10–3.14. Client key authorization is off by default (GPT2GIGA_ENABLE_API_KEY_AUTH=False) and mandatory only in PROD mode, while DEV mode exposes /docs and /logs. The repository has dated verification records for Codex 0.142.1, Claude Code 2.1.187 and Gemini CLI 0.46.0, the Claude Desktop record is marked beta, and the Cursor, Aider, OpenHands and Qwen Code guides have no such record yet.

How to disable. Stop the gpt2giga process, unset ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY or remove the gpt2giga provider from ~/.codex/config.toml, and uninstall the package with uv tool uninstall gpt2giga.

FAQ

Do I need an Anthropic key for Claude Code?

No. Requests go to GigaChat, so any non-empty ANTHROPIC_API_KEY works, or the GPT2GIGA_API_KEY value when proxy authorization is on.

What is the difference between /v1 and /v2?

The /v1 path always selects the GigaChat v1 contract, /v2 selects v2. For Codex with GigaChat built-in tools such as web_search, the guide recommends /v2.

Can each client pass its own GigaChat credentials?

Yes, with GPT2GIGA_PASS_TOKEN=True the proxy accepts them in the Authorization header, though the docs recommend keeping credentials on the server.

Discussion

No questions or reviews yet.

Russian stack

A local proxy exposing GigaChat through OpenAI- and Anthropic-compatible APIs so it can drive Claude Code, aider and other agents

CLIExtended access
Russian stack

Eight skills for coding against the GigaChat API: choosing a layer, access setup, SDK, LangChain, gpt2giga and Deep Agents

SkillExtended access4Repository stars
Russian stack

An MCP gateway to GigaChat and YandexGPT with automatic failover between them and 152-FZ personal-data anonymization

MCP serverExtended access1Repository stars
Russian stack

A small Python MCP server for Sber's GigaChat API: authorizes with a Basic key and calls the models directly from an agent, tested on OpenCode under Windows

MCP serverExtended access

OpenAI to GigaChat migration skill

migrate-to-gigachat-skill

Russian stack

A Cursor skill that migrates Python, JS or TS projects from OpenAI to GigaChat: detects the stack, picks an adapter, and verifies with tests it still starts

SkillExtended access1Repository stars
Russian stack

A Home Assistant integration that puts GigaChat, YandexGPT or another LLM behind your smart-home voice assistant

PluginBroad access2Repository stars

README in short

The README opens by noting GigaChat cannot replace OpenAI or Anthropic without client changes, and lists every supported endpoint of the three APIs. Then it covers installation via uv, pip and Docker Compose, running, the GIGACHAT_* and GPT2GIGA_* variables, OpenAI and Anthropic SDK examples and what is disabled. The GitHub Pages docs cover configuration, deployment behind a reverse proxy and step-by-step integrations with Claude Code, Codex, Gemini CLI, Cursor and other clients.

README badge

Report a problem

Foxx AIgpt2giga
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.