# Laguna S 2.1

Laguna S 2.1 handles agentic coding work: writing and debugging code, running tests, building browser-based tooling, and working on machine learning operations (MLOps) pipelines. Laguna S 2.1 is an open-weight Mixture-of-Experts (MoE) model with a context window of 1M tokens.

- **Model ID:** `poolside/laguna-s-2.1`
- **Type:** chat
- **Providers:** poolside
- **Context window:** 1,000,000
- **Maximum output tokens:** 131,072
- **Pricing:** $0.09/1M input tokens, $0.18/1M output tokens
- **Canonical page:** https://vercel.com/ai-gateway/models/laguna-s-2.1

## Supported parameters

Detailed capability metadata has not been reported for this model.

## Example

```ts
import { streamText } from 'ai'

const result = streamText({
  model: 'poolside/laguna-s-2.1',
  prompt: 'Why is the sky blue?'
})
```

## About

Laguna S 2.1 became available on AI Gateway on July 20, 2026. Laguna S 2.1 is a Mixture-of-Experts (MoE) model with 118 billion total parameters and 8 billion active per token, and it runs in thinking and no-thinking modes. Poolside published the weights on Hugging Face under the OpenMDW-1.1 license. AI Gateway lists two versions: this one, with a context window of 1M tokens, and a free version with a smaller window at `laguna-s-2.1-free`.

Agentic coding is the focus. With thinking enabled, Laguna S 2.1 scores 70.2% on Terminal-Bench 2.1, 78.5% on SWE-Bench Multilingual, and 59.4% on SWE-Bench Pro (public dataset). Broader agentic evaluations put it at 40.4% on DeepSWE v1.1, 46.2% on SWE Atlas codebase question answering, and 49.7% on Toolathlon Verified. Thinking accounts for a large share of those results. Without it, the Terminal-Bench 2.1 score falls to 60.4% and DeepSWE to 16.5%.

The context window of 1M tokens supports the sessions Laguna S 2.1 is built for. A single agent run accumulates terminal output, file contents, and tool results across many steps before it finishes. In one case study Poolside published, Laguna S 2.1 built a working HTML and CSS rendering engine from an empty folder over 181 steps with no human intervention, then checked its own rendering against a headless browser.

Poolside documented three limitations at release. First, Laguna S 2.1 sometimes relies on a remembered tool interface instead of the schema a third-party agent harness supplies. That usually corrects itself once the harness rejects the call and asks for a retry. Second, tool arguments that expect a JSON array can come back with invalid escaping. Third, Laguna S 2.1 can think for long stretches on competition mathematics before it makes progress. Laguna S 2.1 also accepts text input only, with no image or audio input.

Set the model to `poolside/laguna-s-2.1` in the AI SDK, Chat Completions API, Responses API, Messages API, or other API formats, from TypeScript or Python. To use Laguna S 2.1 inside a coding agent, run `vercel ai-gateway setup`, then select `poolside/laguna-s-2.1` in the agent's model configuration. AI Gateway serves Laguna S 2.1 through Poolside, with retries and failover, and expanded capacity for both versions after launch. Pricing mirrors the provider with no markup and no platform fee on inference, including on Bring Your Own Key (BYOK) requests.

## What to consider

Thinking mode is on by default, and Laguna S 2.1 chooses its own test-time compute budget for each problem. Poolside shipped this release without low, medium, and high effort levels, so the practical choice is thinking on or off. Hard problems can produce long thinking sequences, so set generous timeouts on agent runs and watch token usage in AI Gateway reporting.

## When to use

### Best For

- **Long-Horizon Coding Agents:** Sessions that run for many steps and accumulate large working context
- **Terminal-Driven Automation:** Agents that work through a shell to build, run, and verify software
- **Multilingual Bug Fixing:** Repository work that spans several programming languages, with 78.5% on SWE-Bench Multilingual
- **Codebase Question Answering:** Questions that need the model to read widely across a repository first
- **High-Volume Agent Traffic:** AI Gateway expanded serving capacity for Laguna S 2.1 after the initial launch

### Consider Alternatives When

- **Image or Audio Input:** Laguna S 2.1 takes text only, so multimodal work needs a model such as Inkling
- **Strict Third-Party Harnesses:** Laguna S 2.1 can misread tool schemas that closely resemble the ones it knows
- **Fixed Reasoning Budgets:** Thinking is either on or off, with no low, medium, or high effort levels
- **Broad General Assistance:** Agentic coding is the target, not open-domain chat or factual recall
- **Evaluation and Prototyping:** The free version at `laguna-s-2.1-free` covers early testing at a smaller context window

## Best for

- **Long-Horizon Coding Agents:** Sessions that run for many steps and accumulate large working context
- **Terminal-Driven Automation:** Agents that work through a shell to build, run, and verify software
- **Multilingual Bug Fixing:** Repository work that spans several programming languages, with 78.5% on SWE-Bench Multilingual
- **Codebase Question Answering:** Questions that need the model to read widely across a repository first
- **High-Volume Agent Traffic:** AI Gateway expanded serving capacity for Laguna S 2.1 after the initial launch

## Consider alternatives

- **Image or Audio Input:** Laguna S 2.1 takes text only, so multimodal work needs a model such as Inkling
- **Strict Third-Party Harnesses:** Laguna S 2.1 can misread tool schemas that closely resemble the ones it knows
- **Fixed Reasoning Budgets:** Thinking is either on or off, with no low, medium, or high effort levels
- **Broad General Assistance:** Agentic coding is the target, not open-domain chat or factual recall
- **Evaluation and Prototyping:** The free version at `laguna-s-2.1-free` covers early testing at a smaller context window

## Frequently asked questions

### What is Laguna S 2.1 built for?

Agentic coding and long-running tasks. That includes writing and debugging code, running tests, building browser-based tooling, and working on machine learning operations (MLOps) pipelines and AI research.

### How does Laguna S 2.1 differ from the free version?

The context window. Laguna S 2.1 supports 1M tokens, while `laguna-s-2.1-free` supports a smaller window. Both versions serve the same model, so capability is the same within the window each one allows.

### How does thinking mode affect Laguna S 2.1?

Thinking raises scores on hard agentic tasks. With thinking enabled, Laguna S 2.1 scores 70.2% on Terminal-Bench 2.1 against 60.4% without it, and 40.4% on DeepSWE v1.1 against 16.5%. Thinking is enabled by default, and the model sets its own budget per problem.

### How did Laguna S 2.1 score on coding benchmarks?

70.2% on Terminal-Bench 2.1, 78.5% on SWE-Bench Multilingual, and 59.4% on SWE-Bench Pro (public dataset), all in thinking mode. On broader agentic evaluations, Laguna S 2.1 scores 40.4% on DeepSWE v1.1, 46.2% on SWE Atlas codebase question answering, and 49.7% on Toolathlon Verified.

### How do I call Laguna S 2.1 through AI Gateway?

Set the model to `poolside/laguna-s-2.1` in the AI SDK, Chat Completions API, Responses API, Messages API, or other API formats, from TypeScript or Python. AI Gateway handles authentication, retries, and failover across `poolside`.

### Can I run Laguna S 2.1 in a coding agent?

Yes. Run `vercel ai-gateway setup` to connect your agents to AI Gateway, then select `poolside/laguna-s-2.1` in the agent's model configuration. See the coding agents guide at https://vercel.com/docs/ai-gateway/coding-agents.

### What are the known limitations of Laguna S 2.1?

Poolside listed three. Laguna S 2.1 can follow a remembered tool interface instead of the one a third-party harness defines, which typically resolves after a rejected call and a retry. Tool arguments expecting a JSON array can come back with invalid escaping. Laguna S 2.1 can also think for long stretches on competition mathematics before making progress.

### Are the weights for Laguna S 2.1 open?

Yes. Poolside published them on Hugging Face under the OpenMDW-1.1 license, which permits commercial and non-commercial use and modification. Quantized variants ship alongside the original weights.

### Does AI Gateway support Zero Data Retention for Laguna S 2.1?

Zero Data Retention is not currently available for this model. Zero Data Retention is offered on a per-provider basis. See https://vercel.com/docs/ai-gateway/capabilities/zdr for details.

### What does Laguna S 2.1 cost?

Current rates appear in the pricing panel on this page. AI Gateway mirrors provider pricing with no markup and adds no platform fee on inference, including on Bring Your Own Key requests.

## Links

- [Model page](https://vercel.com/ai-gateway/models/laguna-s-2.1)
- [AI Gateway documentation](https://vercel.com/docs/ai-gateway)
- [Provider model documentation](https://docs.poolside.ai/release-notes/models#laguna-s-2-1)


If you encounter incorrect information, can’t find what you need, need a capability Vercel doesn’t currently offer, or have any other feedback to report, please do it by following the instructions at https://vercel.com/feedback.md.
