VercelDev & Eng

Content type: Concept

4 min read

SubQ Savant 1.4 arrives on Vercel AI Gateway with 4-million-token context window

Article · Dev & Eng
Reading
4 min
Code
1
In short

Subquadratic launched SubQ Savant 1.4 on Vercel's AI Gateway with the largest context window available on the platform so far: 4 million tokens, double the runner-up.

Vercel added SubQ Savant 1.4, from Subquadratic, to the AI Gateway catalog. According to Vercel's official changelog, the model's standout feature is its context window: 4 million tokens, the largest among the models available on the platform at launch and roughly double the runner-up.

For those building AI-powered products on the front end, this isn't just "one more model on the list." It's a shift in category: the difference between sending a relevant excerpt of a document and sending the whole document, between building a retrieval pipeline and simply pasting everything into the prompt.

What the 4M-token context solves in practice

Vercel's pitch is straightforward: with this window, you can send an entire codebase, a large set of contracts, or a lengthy research file in a single request, without slicing the content or building a vector search pipeline beforehand.

In practice, this tackles the problem anyone who has implemented RAG knows well: fragmentation. Today, to feed a model with large context, the common flow is:

  1. Break the document into chunks
  2. Generate embeddings for each piece
  3. Index them in a vector database
  4. Retrieve the most relevant excerpts when the question comes in
  5. Assemble the final prompt with the retrieved excerpts

With a 4M-token window, this entire pipeline can, in many cases, become a single step: sending the raw material. The model accepts text, but also images and PDFs as files, which eliminates yet another pre-processing step (extracting text from a PDF before sending it to the model).

Implicit caching changes the cost calculation

A detail that goes unnoticed in the announcement but is central for anyone running this in production: prompt caching is implicit. Repeated requests over the same material hit the cache automatically, with no extra configuration.

This matters because a 4M-token context has a real cost per processed token. Without caching, resending the same codebase or contract for every user question would be expensive and slow. With implicit caching, the usage pattern "load the document once, ask several questions about it" becomes viable without extra caching engineering on the application side.

Reasoning always on, without seeing the reasoning

SubQ Savant 1.4 has a behavior that differs from most models on the Gateway: reasoning is always on, it's not something you turn on or off. The reasoning effort can be set to low, high, or max, with high as the default.

The part that deserves attention from anyone debugging prompts in production: the reasoning comes encrypted. The response reports the count of reasoning tokens used, but not the reasoning text itself. This differs from models that expose the chain of thought (even if summarized) for debugging or transparency purposes: here, you pay for the reasoning, but you don't see what it produced.

How to call the model

The model's name on the Gateway is subquadratic/subq-savant-1.4. With Vercel's AI SDK, the call follows the pattern already familiar to anyone who uses other models on the Gateway:

javascript
import { streamText } from 'ai';

const result = streamText({
 model: 'subquadratic/subq-savant-1.4',
 prompt: 'Explique a diferença entre indenização e limitação de responsabilidade.',
});

for await (const text of result.textStream) {
 process.stdout.write(text);
}

To use it with code agents like Claude Code, Codex, or Cursor, Vercel recommends installing the latest CLI and running npx vercel ai-gateway setup, selecting subquadratic/subq-savant-1.4 from the agent's model list.

What this changes for teams that already have RAG in production

Here it's worth separating expectation from reality. A giant context doesn't replace retrieval in every scenario: if the knowledge base has hundreds of millions of tokens (a huge corporate documentation base, for example), 4M tokens is still insufficient and the search pipeline remains necessary.

Where SubQ Savant 1.4 changes the game is in the middle ground: applications that today implement RAG not because the data volume demands it, but because the model's context was too small for the entire document to fit. A 200-page contract, a microservice's codebase, a research report: that fits comfortably within 4M tokens, and sending it all at once eliminates the complexity of indexing, the latency of vector search, and the risk of the wrong chunk being retrieved at the wrong time.

The trade-off is cost and latency per request: processing a 4M-token context is more expensive and slower than retrieving and sending 2,000 relevant tokens. For one-off questions over a large, stable knowledge base, traditional RAG still pays off. For analysis that needs the entire document at once (contract auditing, full codebase review, long-file summarization), the giant context is the simpler path and, with implicit caching, not necessarily the most expensive one for repeated use.

Gateway pricing and positioning

Vercel emphasizes that the AI Gateway reflects the provider's price with no markup and doesn't charge a platform fee on inference, including for requests with Bring Your Own Key (BYOK). This means the cost of using SubQ Savant 1.4 through the Gateway is the same as going directly through Subquadratic, with the added benefit of staying within the same billing, retry, and failover dashboard that already centralizes other models.

For those who already use the AI Gateway to route between models (GPT, Claude, Gemini, and now SubQ Savant), the addition is one more option in the same unified interface, without needing to integrate a separate SDK from Subquadratic.

Translated from the Brazilian Portuguese original · Read the original