# GigaChat4 708B A41B

URL: https://interfaze.ai/models/ai-sagegigachat4-708b-a41b

[All models](https://interfaze.ai/models)

GigaChat4 708B A41B by ai-sage, a text-generation model. Understand and compare features, benchmarks, and capabilities.

## Comparison

| Feature | GigaChat4 708B A41B | Interfaze |
| --- | --- | --- |
| Input Modalities | text | image, text, audio, video, document |
| Native OCR | No | Yes |
| Long Document Processing | Yes | Yes |
| Language Support | 26 partial | 162+ |
| Native Speech-to-Text | No | Yes |
| Native Object Detection | No | Yes |
| Guardrail Controls | Yes | Yes |
| Context Input Size | 1M | 1M |
| Tool Calling | Yes | Tool calling supported + built in browser, code execution and web search |

### Scaling

| Feature | GigaChat4 708B A41B | Interfaze |
| --- | --- | --- |
| Scaling | Self-hosted/Provider-hosted with quantization | Unlimited |

[Try Interfaze](https://interfaze.ai/dashboard)[Read the Docs](https://interfaze.ai/docs)

View model card on [Hugging Face](https://huggingface.co/ai-sage/GigaChat4-708B-A41B)

GigaChat 4 is the flagship hybrid model of the GigaChat family. It combines a Mixture-of-Experts (MoE) architecture with DeepSeek Sparse Attention (DSA) and Gated DeltaNet (GDN) with **708B** total parameters and **41B** active parameters per token. The model supports multilingual conversation, multi-step agentic tasks, tool calling, structured outputs, mathematical reasoning, coding, and question answering over long documents.

Unlike GigaChat 3.5, which offered separate instant and reasoning checkpoints, GigaChat 4 supports both modes within a single model, selectable per request. It features a one-million-token context window and supports speculative decoding with either a recurrent MTP drafter or a separate DFlash2 drafter.

**This repository contains the final FP8 instruction-tuned model, which supports both instant and reasoning modes.**

## Model variants

| Repository | Weights | Training stage |
| --- | --- | --- |
| GigaChat4-708B-A41B | FP8 | Instruction-tuned |
| GigaChat4-708B-A41B-GGUF | GGUF | Instruction-tuned |
| GigaChat4-708B-A41B-bf16 | BF16 | Instruction-tuned |
| GigaChat4-708B-A41B-base | BF16 | Base |
| GigaChat4-708B-A41B-checkpoints | BF16 | Base, intermediate checkpoints |

## Model architecture

GigaChat 4 extends the hybrid backbone of GigaChat 3.5 by adding DSA to its multi-head latent attention (MLA) layers.

| Property | Value |
| --- | --- |
| Total / active parameters per token | 708B / 41B |
| Decoder layers / hidden size | 64 / 7,168 |
| Linear-attention / sparse-attention layers | 48 / 16 |
| Routed experts / active routed experts / shared experts | 256 / 8 / 1 |
| Initial decoder layers with dense FFNs | 3 |
| Maximum context length | 1,048,576 tokens |
| DSA tokens selected per query | 2,048 |
| Built-in MTP layers | 1, reused recurrently |

### Mixture-of-Experts (MoE)

GigaChat 4 has 708B total parameters, with 41B active per token. Each MoE layer combines an attention block with shared and routed experts, selecting 8 of 256 routed experts per token alongside a shared expert. GatedNorm is applied to block outputs before residual addition.

### Hybrid attention

The model interleaves GatedDeltaNet and DSA layers in a 3:1 ratio. GatedDeltaNet maintains a fixed-size recurrent state for efficient processing, while DSA selectively attends to 2,048 earlier tokens per query, enabling retrieval of information from long contexts.

The context window was progressively extended from 32K to 128K and finally to 1M tokens. DSA was introduced at 128K through indexer-only training, followed by joint optimization of the indexer and backbone at 1M tokens.

### Speculative decoding

GigaChat 4 supports two approaches to speculative decoding:

-   **Recurrent MTP:** An EAGLE-3-style drafter that reuses a single prediction layer across draft steps, reducing drafter parameters by approximately 3× compared to GigaChat 3.5's three independent MTP blocks without sacrificing draft quality.
    
-   **DFlash2:** A separate five-layer BF16 drafter that predicts tokens in parallel using blocks of eight positions: one anchor token and seven draft positions.
    

Both approaches accelerate autoregressive generation by allowing the target model to verify multiple draft tokens in a single forward pass.

## Training and alignment

### Pretraining stability

Several techniques were introduced to improve training stability at scale:

-   **Progressive residual warm-up (ProRes)** gradually increases residual branch contributions during early training, with deeper layers warming up more slowly to prevent activation growth.
    
-   **Projection-specific z-loss and logit softcapping** control activation outliers and extreme output logits.
    
-   **Dynamic learning-rate rescaling (DLR)** adjusts learning rates for individual MoE blocks when persistent expert-load imbalance is detected, without affecting the rest of the model.
    

### Alignment

Following supervised fine-tuning, expert models were trained using reinforcement learning on mathematics, coding, tool use, and multi-turn agent workflows.

These experts were then consolidated into a single model through multi-teacher on-policy distillation, where the student generates its own responses and receives task-specific feedback from the corresponding teachers.

Muon was used for optimization during this stage. The resulting model supports both instant and reasoning modes within a single checkpoint.

For more details on the model architecture, training methodology, and alignment, see the [GigaChat 4 technical report](https://github.com/salute-developers/gigachat4/blob/main/GigaChat_4.pdf).

## Evaluation Results

The following tables summarize GigaChat 4's performance across a broad range of benchmarks. All scores are reported as percentages unless otherwise specified. A dash indicates an unreported result.

### Reasoning

#### Code

| Benchmark | GigaChat 4 708B | GigaChat 3.5 Ultra 432B | DeepSeek V4 Flash 0731 | GLM-5.3 | DeepSeek 4.1 1017 | Qwen 3.5 397B | Mistral 4 Large |
| --- | --- | --- | --- | --- | --- | --- | --- |
| LiveCodeBench v6 | 88.82 | 85.40 | 90.00 | 82.67 | 90.14 | 86.64 | 84.64 |
| SWE-bench Verified (7-hour timeout) | 80.89 | 64.70 | 81.80 | 86.67 | 79.40 | 73.00 | 79.60 |
| SWE-bench Multilingual (7-hour timeout) | 77.00 | — | 73.00 | 80.33 | 79.33 | 66.33 | 81.67 |
| DeepSWE (7-hour timeout) | 35.40 | — | 53.10 | 67.26 | 74.34 | 3.54 | 61.95 |
| NL2Repo (Cheating adjusted) (7-hour timeout) | 30.89 | 5.00 | 33.13 | 28.69 | 5.90 | 18.59 | 27.88 |
| Terminal-Bench 2.0 (7-hour timeout) | 71.26 | 30.30 | 55.01 | 71.67 | 61.80 | 56.18 | 77.78 |
| Terminal-Bench 2.1 (7-hour timeout) | 69.66 | — | 78.65 | 88.70 | 87.64 | 57.30 | 83.33 |

#### General

| Benchmark | GigaChat 4 708B | GigaChat 3.5 Ultra 432B | DeepSeek V4 Flash 0731 | GLM-5.3 | DeepSeek 4.1 1017 | Qwen 3.5 397B | Mistral 4 Large |
| --- | --- | --- | --- | --- | --- | --- | --- |
| IFBench (prompt-level loose) | 80.33 | 77.00 | 63.00 | 55.67 | 75.67 | 74.33 | 71.00 |
| JSONSchemaBench | 99.28 | 93.01 | 94.00 | 91.64 | 99.31 | 96.26 | 97.38 |
| StructEval Text | 87.64 | 85.00 | 88.00 | 85.36 | 85.36 | 85.48 | 86.10 |
| POLLUX | 81.46 | 75.50 | 70.00 | 77.96 | 78.64 | 74.16 | 73.18 |
| GraphWalks | 74.92 | 38.00 | 72.70 | 78.35 | 79.09 | 61.01 | 78.45 |
| Natural Plan | 94.53 | 80.19 | 91.03 | 80.00 | 93.73 | 92.25 | 94.39 |
| NIH Complex | 100.00 | 99.16 | — | 96.89 | 96.53 | 98.74 | 99.75 |
| AA-LCR | 70.33 | 25.00 | — | 66.70 | — | 68.00 | 73.67 |

#### STEM

| Benchmark | GigaChat 4 708B | GigaChat 3.5 Ultra 432B | DeepSeek V4 Flash 0731 | GLM-5.3 | DeepSeek 4.1 1017 | Qwen 3.5 397B | Mistral 4 Large |
| --- | --- | --- | --- | --- | --- | --- | --- |
| GPQA Diamond | 82.83 | 82.30 | 91.00 | 90.40 | 90.91 | 85.35 | 87.37 |
| HMMT (pass@8) | 98.33 | 93.00 | 100.00 | 100.00 | 100.00 | 98.33 | 100.00 |
| HMMT (mean@8) | 93.75 | — | 98.75 | 92.08 | 97.92 | 82.71 | 99.58 |
| AIME 2025 (pass@8) | 96.67 | 93.00 | 96.67 | 100.00 | 100.00 | 96.67 | 100.00a |
| AIME 2025 (mean@8) | 93.33 | 89.00 | 90.00 | 93.125 | 97.60 | 93.75 | 97.08a |
| AIME 2026 (pass@8) | 96.67 | 97.00 | 100.00 | 100.00 | 100.00 | — | 100.00a |
| AIME 2026 (mean@8) | 95.00 | 91.00 | 95.00 | 95.104 | 98.23 | — | 99.17a |
| IMO-AnswerBench | 82.69 | 73.00 | 89.80 | 88.50 | 92.69 | 83.22 | 78.20 |
| HLE (text only, without tools) | 23.91 | 13.16 | 37.80 | 39.62 | 43.42 | 28.36 | 30.40 |

a Evaluated without tools.

#### Agentic

| Benchmark | GigaChat 4 708B | GigaChat 3.5 Ultra 432B | DeepSeek V4 Flash 0731 | GLM-5.3 | DeepSeek 4.1 1017 | Qwen 3.5 397B | Mistral 4 Large |
| --- | --- | --- | --- | --- | --- | --- | --- |
| BFCL v4 | 79.55 | 58.59 | 73.12 | 68.29 | 72.18 | 69.10 | 70.68 |
| τ²-Bench (mean@3) | 83.31 | 61.58 | 83.30 | 78.70 | 79.43 | 78.83 | 80.60 |
| τ³-Bench Banking (mean@3) | 18.03 | 8.93 | 20.90 | 56.00 | 21.65 | 12.03 | 24.74 |
| CoworkBench | 83.00 | 25.00 | 78 | 73.79 | 77.82 | 64.11 | 59.27 |
| SkillsBench (no skills) | 33.08 | — | 29.89 | 45.47 | 45.47 | 42.06 | 37.00 |
| SkillsBench (skills) | 58.24 | — | 59.81 | 61.54 | — | 42.06 | 46.90 |
| HealthAdminBench (success rate / mean) | 40.74 / 88.27 | — | 25.92 / 78.36 | 45.93 / 88.37 | — | 41.48 / 86.12 | — |

### Instant

#### Code

| Benchmark | GigaChat 4 708B | GigaChat 3.1 Ultra 702B | GigaChat 3.5 Ultra 432B | DeepSeek V4 Flash 0731 | Qwen 3.5 397B |
| --- | --- | --- | --- | --- | --- |
| LiveCodeBench v6 | 78.77 | 57.00 | 56.20 | 71.18 | 61.52 |
| SWE-bench Verified (7-hour timeout) | 80.82 | 9.00 | 39.70 | 78.80 | 68.60 |
| SWE-bench Multilingual (7-hour timeout) | 70.67 | 3.33 | 21.60 | 72.33 | 65.00 |
| DeepSWE (7-hour timeout) | 19.47 | 0.00 | 0.00 | 28.32 | 0.88 |
| NL2Repo (Full score) (7-hour timeout) | 37.56 | 7.90 | — | 30.37 | 30.28 |
| Terminal-Bench 2.0 (7-hour timeout) | 60.47 | 9.00 | 12.94 | — | 49.44 |
| Terminal-Bench 2.1 (7-hour timeout) | 66.29 | 6.74 | — | 70.77 | 56.18 |

#### General

| Benchmark | GigaChat 4 708B | GigaChat 3.1 Ultra 702B | GigaChat 3.5 Ultra 432B | DeepSeek V4 Flash 0731 | Qwen 3.5 397B |
| --- | --- | --- | --- | --- | --- |
| IFBench (prompt-level loose) | 50.33 | 29.00 | 43.66 | 40.00 | 53.00 |
| JSONSchemaBench | 88.31 | 93.96 | 83.94 | 93.70 | 93.45 |
| StructEval Text | 89.12 | 84.98 | 74.35 | 85.64 | 83.62 |
| POLLUX | 79.65 | 63.28 | 74.25 | 72.22 | 74.29 |
| GraphWalks | 48.02 | 15.16 | 19.99 | 51.16 | 56.49 |
| Natural Plan | 52.17 | 32.00 | 66.42 | 41.58 | 45.72 |
| NIH Complex | 95.71 | 74.22 | 97.11 | 32.21 | 99.24 |
| AA-LCR | 48.00 | — | 27.60 | — | 60.00 |

#### STEM

| Benchmark | GigaChat 4 708B | GigaChat 3.1 Ultra 702B | GigaChat 3.5 Ultra 432B | DeepSeek V4 Flash 0731 | Qwen 3.5 397B |
| --- | --- | --- | --- | --- | --- |
| GPQA Diamond | 70.20 | 56.57 | 61.11 | 74.75 | 83.33 |
| HMMT (pass@8) | 86.67 | 45.00 | 55.00 | 70.00 | 78.33 |
| HMMT (mean@8) | 63.75 | — | — | 44.38 | 63.33 |
| AIME 2025 (pass@8) | 93.33 | 73.33 | 93.30 | 86.67 | 93.33 |
| AIME 2025 (mean@8) | 68.75 | 37.08 | 68.00 | 48.23 | 80.00 |
| AIME 2026 (pass@8) | 96.67 | 66.67 | 83.30 | 93.33 | 93.333 |
| AIME 2026 (mean@8) | 80.83 | 39.17 | 67.00 | 60.42 | 86.250 |
| IMO-AnswerBench | 60.09 | 28.75 | 32.00 | 41.91 | 72.38 |
| Humanity's Last Exam (text only, without tools) | 8.20 | 4.00 | 3.94 | 10.43 | 19.83 |

#### Agentic

| Benchmark | GigaChat 4 708B | GigaChat 3.1 Ultra 702B | GigaChat 3.5 Ultra 432B | DeepSeek V4 Flash 0731 | Qwen 3.5 397B |
| --- | --- | --- | --- | --- | --- |
| BFCL v4 | 63.62 | \-- | 51.57 | 65.81 | — |
| τ²-Bench (mean@3) | 66.75 | 33.00 | 68.71 | 77.13 | 78.73 |
| τ³-Bench Banking (mean@3) | 15.00 | 5.50 | 5.15 | — | 12.71 |
| CoworkBench (Pi) | 75.00 | — | 19.76 | 54.84 | 63.31 |
| SkillsBench (without skills) | 33.93 | 0.51 | — | 27.87 | — |
| SkillsBench (with skills) | 54.24 | 1.23 | — | 54.32 | — |
| HealthAdminBench (success rate / mean) | 40.74 / 86.99 | — | — | 23.73 / 70.14 | 33.33 / — |
| JobBench | 33.59 | — | — | 29.64 | 16.85 |

### Evaluation Notes

Agentic benchmarks were evaluated using Harbor-based runners (SWE-bench, Terminal-Bench, NL2Repo, SkillsBench, HealthAdminBench, CoworkBench, and JobBench), except DeepSWE, which used Pier. Runs with a seven-hour timeout are marked in the tables.

NL2Repo reports cheating-adjusted scores, counting cheating attempts as zero. StructEval uses the text subset with rule-based scoring, while HLE includes only text-based questions without tools. HealthAdminBench reports success rate / mean.

## Usage

### SGLang

GigaChat 4 is natively supported in [SGLang](https://github.com/sgl-project/sglang), including recurrent MTP and DFlash2 speculative decoding, per-request instant/reasoning mode selection, and tool calling.

For detailed deployment instructions, hardware configurations, API examples, and performance benchmarks, see the [GigaChat 4 SGLang cookbook](https://docs.sglang.io/cookbook/autoregressive/GigaChat/GigaChat4).

The deployment recipe below was tested on SGLang commit [`ff14289793`](https://github.com/sgl-project/sglang/commit/ff142897935ec6ede004dea8439d6111110bd446).

**Installation**

```
python3 -m pip install \
  "sglang @ git+https://github.com/sgl-project/sglang.git@ff142897935ec6ede004dea8439d6111110bd446#subdirectory=python"
```

**Deployment**

The FP8 model can be deployed on two nodes with eight H100 80GB GPUs each (TP16). Download the same model revision on both nodes and run the following command with `HEAD_IP` set to the head node's IP address and `NODE_RANK` set to `0` or `1` on the respective nodes.

```
sglang serve \
  --model-path ai-sage/GigaChat4-708B-A41B \
  --tp 16 \
  --nnodes 2 \
  --node-rank "$NODE_RANK" \
  --dist-init-addr "${HEAD_IP}:20000" \
  --mem-fraction-static 0.8 \
  --max-running-requests 64 \
  --cuda-graph-max-bs-decode 64 \
  --reasoning-parser auto \
  --tool-call-parser auto \
  --speculative-algorithm EAGLE \
  --speculative-num-steps 3 \
  --speculative-eagle-topk 1 \
  --speculative-num-draft-tokens 4 \
  --host 0.0.0.0 \
  --port 30000
```

This configuration enables recurrent MTP speculative decoding using the built-in draft head. For DFlash2 deployment and alternative serving configurations, refer to the cookbook.

**Instant and reasoning modes**

Both modes are available through the same OpenAI-compatible API. Set `chat_template_kwargs.reasoning` to `false` for instant mode or `true` for reasoning mode.

```
curl http://localhost:30000/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "ai-sage/GigaChat4-708B-A41B",
    "messages": [
      {"role": "user", "content": "What is 17 times 24?"}
    ],
    "temperature": 1.0,
    "top_p": 1.0,
    "repetition_penalty": 1.0,
    "max_tokens": 4096,
    "chat_template_kwargs": {"reasoning": false}
  }'
```

The chat template enables reasoning by default when the argument is omitted. With the reasoning parser enabled, the response separates thinking into `message.reasoning_content` and the final answer into `message.content`.

For tool calling, multi-turn conversations, streaming, and advanced inference settings, see the [SGLang cookbook](https://docs.sglang.io/cookbook/autoregressive/GigaChat/GigaChat4).

### vLLM

GigaChat 4 supports inference with [vLLM](https://github.com/vllm-project/vllm), including recurrent MTP and DFlash2 speculative decoding, per-request instant/reasoning mode selection, and tool calling.

The following example uses vLLM commit [`c0c9083`](https://github.com/vllm-project/vllm/commit/c0c90837262bf3059b3d7b20bf120ffbe197a785) from the [GigaChat 4 integration PR](https://github.com/vllm-project/vllm/pull/69762).

**Installation**

```
git clone https://github.com/vllm-project/vllm.git
cd vllm
git fetch origin c0c90837262bf3059b3d7b20bf120ffbe197a785
git checkout --detach c0c90837262bf3059b3d7b20bf120ffbe197a785

python3 -m pip install --upgrade pip
VLLM_USE_PRECOMPILED=1 python3 -m pip install -e .
```

**Deployment**

The example below uses two nodes with eight H100 80GB GPUs each (TP16) and recurrent MTP speculative decoding enabled.

```
vllm serve ai-sage/GigaChat4-708B-A41B \
  --tensor-parallel-size 16 \
  --enable-expert-parallel \
  --distributed-executor-backend mp \
  --nnodes 2 \
  --node-rank "$NODE_RANK" \
  --master-addr "$HEAD_IP" \
  --master-port 20000 \
  --no-numa-bind \
  --gpu-memory-utilization 0.90 \
  --max-num-seqs 16 \
  --max-num-batched-tokens 4096 \
  --compilation-config '{"max_cudagraph_capture_size":64}' \
  --tool-call-parser gigachat4 \
  --enable-auto-tool-choice \
  --reasoning-parser gigachat4 \
  --speculative-config '{"method":"mtp","num_speculative_tokens":3}' \
  --host 0.0.0.0 \
  --port 8000
```

**Instant and reasoning modes**

Both modes are available through the same OpenAI-compatible API. Set `chat_template_kwargs.reasoning` to `false` for instant mode or `true` for reasoning mode.

```
curl http://localhost:8000/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "ai-sage/GigaChat4-708B-A41B",
    "messages": [
      {"role": "user", "content": "Prove that the sum of the first n odd positive integers is n**2. Write a proof in the style of Eminem’s lyrics."}
    ],
    "max_tokens": 8192,
    "temperature": 1.0,
    "top_p": 1.0,
    "chat_template_kwargs": {"reasoning": true}
  }'
```

The chat template enables reasoning by default when the argument is omitted. With the reasoning parser enabled, the response separates thinking into `message.reasoning` and the final answer into `message.content`. The `max_tokens` limit covers both.

**Tool calling**

The following example demonstrates tool calling in reasoning mode using the OpenAI-compatible Chat Completions API.

```
curl http://localhost:8000/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "ai-sage/GigaChat4-708B-A41B",
    "messages": [
      {"role": "user", "content": "What is the weather in London right now?"}
    ],
    "tools": [
      {
        "type": "function",
        "function": {
          "name": "get_weather",
          "description": "Get the current weather in a city",
          "parameters": {
            "type": "object",
            "properties": {
              "city": {"type": "string"}
            },
            "required": ["city"]
          }
        }
      }
    ],
    "tool_choice": "auto",
    "max_tokens": 2000,
    "temperature": 0.6,
    "chat_template_kwargs": {"reasoning": true}
  }'
```

When the model requests a tool, the response contains the function name and arguments in `message.tool_calls`. Execute the function in your application, append the assistant message and a `tool` message with the matching `tool_call_id`, then request the final answer.

### Recommended agent harnesses

We recommend Pi for agentic tasks with GigaChat 4. Codex CLI and DeepSeek Harness are alternatives for interactive terminal work. You can use each harness’s standard prompts and tools without fine-tuning the checkpoint for that harness.

We verified interactive shell tool calls on an internal checkpoint with Pi 1.6.0, Codex CLI 0.171.0, and DeepSeek Harness 0.2.2-rc.5. Pi and DeepSeek Harness connected directly through Chat Completions. For Codex, we used a Responses-to-Chat-Completions gateway.

Start SGLang as shown above. The examples use the API base URL `http://127.0.0.1:30000/v1` and the model ID `ai-sage/GigaChat4-708B-A41B`. If you set a custom served name, use the ID returned by `GET /v1/models`.

| Harness | API used by the harness | Required endpoint |
| --- | --- | --- |
| Pi | OpenAI Chat Completions | POST /v1/chat/completions |
| Codex CLI | OpenAI Responses | POST /v1/responses |
| DeepSeek Harness | OpenAI Chat Completions | POST /v1/chat/completions |

#### Pi

Add `gigachat` to the `providers` object in `~/.pi/agent/models.json`.

```
{
  "providers": {
    "gigachat": {
      "baseUrl": "http://127.0.0.1:30000/v1",
      "api": "openai-completions",
      "apiKey": "$GIGACHAT_API_KEY",
      "models": [
        { "id": "ai-sage/GigaChat4-708B-A41B" }
      ]
    }
  }
}
```

Pi reads `GIGACHAT_API_KEY` from the environment. Export your endpoint’s key, or use `export GIGACHAT_API_KEY=local` for an unauthenticated local server. Run `pi` from your project directory and select GigaChat 4 with `/model`.

#### Codex CLI

Codex requires a Responses API endpoint that can stream tool calls and accept tool results on subsequent requests. Connect directly if your SGLang deployment supports the tool types sent by your Codex version. If it serves only Chat Completions or rejects those tool types, set `base_url` to the API root of a compatible Responses-to-Chat-Completions gateway.

For Codex CLI 0.134.0 and later, save this profile as `~/.codex/gigachat.config.toml`.

```
model = "ai-sage/GigaChat4-708B-A41B"
model_provider = "gigachat"

[model_providers.gigachat]
name = "GigaChat 4"
base_url = "http://127.0.0.1:30000/v1"
wire_api = "responses"
```

For an authenticated endpoint, add `env_key = "GIGACHAT_API_KEY"` under `[model_providers.gigachat]` and export the key. If your gateway rejects the built-in `web_search` tool, add `web_search = "disabled"` at the top level, above `[model_providers.gigachat]`. We used this setting with our gateway.

Put both sections in `~/.codex/config.toml`.

```
[model_providers.gigachat]
name = "GigaChat 4"
base_url = "http://127.0.0.1:30000/v1"
wire_api = "responses"

[profiles.gigachat]
model = "ai-sage/GigaChat4-708B-A41B"
model_provider = "gigachat"
```

When upgrading, move the profile settings into `~/.codex/gigachat.config.toml`, then remove the old `[profiles.gigachat]` section and any top-level `profile = "gigachat"` setting from the base file.

Start an interactive session from your project directory.

```
codex --profile gigachat
```

#### DeepSeek Harness

For the interactive terminal UI, install the tested launcher and plugin versions.

```
npm install -g @deepseek-ai/dsh@0.2.2-rc.5
dsh plugin --profile tui add @deepseek-harness-tui/dsh-tui@0.20.2
```

Save the following as `gigachat-dsh.yml`. The interactive TUI and the headless CLI use the same configuration.

```
- id: llm-pi-ai
  config:
    providers:
      gigachat:
        api: openai-completions
        baseURL: http://127.0.0.1:30000/v1
        apiKeyEnv: GIGACHAT_API_KEY
        models:
          - id: ai-sage/GigaChat4-708B-A41B

- id: agent-default-model
  config:
    provider: gigachat
    model: ai-sage/GigaChat4-708B-A41B
```

Export `GIGACHAT_API_KEY` with your endpoint’s key, or set it to `local` for an unauthenticated server. Launch the TUI from the directory containing the configuration.

```
dsh --profile tui --patch ./gigachat-dsh.yml
```

#### Verify the connection and tool calling

To check that the harness can reach the model, execute a tool, and return its output to the model, ask this question in an interactive session:

> How much RAM is available on this machine right now?

The model chooses how to inspect memory. Look for a shell tool call in the session and check that the answer matches the available RAM in the command output.

You can run the same check from a script with the DeepSeek Harness headless CLI.

```
dsh --profile headless --patch ./gigachat-dsh.yml \
  'How much RAM is available on this machine right now?'
```

## License

GigaChat 4 is released under the [MIT License](https://huggingface.co/ai-sage/GigaChat4-708B-A41B/blob/main/LICENSE).

## Want more deterministic results?

[Try Interfaze](https://interfaze.ai/dashboard)[Read the Docs](https://interfaze.ai/docs)
