AI Aulis

AI NEWS IN ENGLISH · 5 December 2026

The most important AI news every morning. AI writes and checks the stories against the original sources – check important facts in the sources.

35 stories · next issue tomorrow morning · How the paper is made →

← Issue 5 December 2026Paper

Perplexity’s Agent API lets the model write code that runs tools in parallel

AI-generated contentWritten by AI

perplexity.ai, docs.perplexity.ai, perplexity.mintlify.app, x.com · 7 sources · Sources published: 1–3 December 2026 · Some source publication dates are unknown

In Code Mode, Perplexity runs a program that carries out searches simultaneously and sends the model only selected data. The preset reasoning effort levels high, xhigh and ultra now use it by default.

Perplexity described the Code Mode feature of its Agent API in a blog post on 3 December. An AI agent usually makes one tool call at a time. It waits for the result and reads all of it into its context window before the next step. In Code Mode, the model writes a JavaScript program that Perplexity runs. The program runs searches in parallel, removes duplicate results and sends the model only the data it selects.

In an example on the company’s blog, the program searched for hospitals in four regions at once, merged the URLs it found, fetched eight pages and saved them to disk. It returned only the pages’ URLs, titles and lengths to the model.

Perplexity measured the benefit with its own WANDR benchmark, which assesses broad and deep information retrieval. The metric is coverage of the requested material, weighted by quality. The company used the first 100 of the benchmark’s 500 tasks. It made two changes in sequence: first it switched to newer models, then it turned on Code Mode. The table shows both steps.

Configuration xhigh: score xhigh: cost/task ultra: score ultra: cost/task
Configuration on 5 November 76.5% $7.30 85.9% $21.71
New models 78.7% $5.57 88.5% $12.12
New models + Code Mode 80.5% $3.85 89.4% $10.30

Source: Perplexity. First 100 WANDR tasks, average cost per task. New models: xhigh Sol-6.2; ultra Opus 5.5 and three Sol-6.2.

Not all of the saving comes from Code Mode. The company calculated its reported savings of 47 and 53 per cent against the configurations in use on 5 November, so they also include the model switch. At the ultra level, most of the saving came from the model switch alone.

Perplexity said mid-tier models previously scored lower and cost more in Code Mode than with direct tool calls. With the new models, high reaches 47.7 per cent in Code Mode at $0.38 per task, 2.9 percentage points better than without Code Mode. The company expects most agents eventually to run in Code Mode by default.

If a program runs for more than 10 seconds, it returns a partial result and continues in the background. The agent retrieves the remaining results with an exec_wait call. In paired WANDR runs at identical spend, this cut median duration by 12.5 per cent. The longest run fell from 174 to 76 minutes.

The change also affects existing users. The changelog says the preset reasoning effort levels high, xhigh and ultra now use Code Mode by default. If a request at these levels uses the Time Machine date cutoff (snapshot_as_of), the API returns an HTTP 400 error. High now also includes a sandbox, and its container time is billed. If a high request does not list the web_search or fetch_url tool, the previous version’s search settings no longer apply; each program sets its own. Direct tool calls remain available by pinning version high@2026-11-11.0 or xhigh@2026-11-18.0.

To turn on Code Mode in your own request, add a programmatic_tool_calling entry to the tools array and allow programs to call each tool you want. Version 0.50.0 of the Python library and version 0.45.0 of the TypeScript SDK do not yet include Code Mode types, so the documentation examples send HTTP requests directly.

Previous coverage

Report an error in this story