Perplexity adds Code Mode to Agent API, cutting benchmark costs by up to 53%
Perplexity introduced Code Mode in its Agent API on December 2, 2026. Models can write JavaScript programs that run enabled tools in parallel instead of making repeated tool-call round-trips. Perplexity reports higher research scores and benchmark cost reductions of up to 53% against its earlier presets.
Perplexity introduced Code Mode in its Agent API on December 2, 2026. The company reports higher research scores and benchmark cost reductions of up to 53% against its earlier presets, according to Unite.ai.
How Code Mode works
Code Mode lets models replace repeated tool-call round-trips with JavaScript programs. These programs run enabled tools in parallel and filter the results.
In API requests, the feature is identified as programmatic_tool_calling. Scripts run inside an embedded QuickJS WebAssembly runtime within the agent loop.
Reported results
Perplexity reports two outcomes against its earlier presets:
- Higher research scores
- Benchmark cost reductions of up to 53%
These figures are Perplexity's own claims. Specific benchmark names and per-benchmark scores are not given in the available summary.
What this means
Code Mode changes how the Agent API handles tool use. Instead of the model calling tools one round-trip at a time, a single JavaScript program can run several enabled tools in parallel and filter their output. Perplexity ties this approach to its reported cost reductions of up to 53% on benchmarks. Developers using the Agent API can opt in through the programmatic_tool_calling identifier in their requests. The 53% figure is the upper bound of Perplexity's reported savings, so actual cost reductions will depend on the workload.
Related Articles
Anthropic Python SDK v2.15.0 fixes 401 token refresh and credential loops, adds three API error codes
Anthropic released v2.15.0 of its Python SDK on November 30. It fixes how cached credentials are refreshed after a 401 response, stops processes sharing one login from refreshing each other's tokens in a loop, and adds three new API error codes.
GitHub deprecates Claude Opus 4.8 (fast) across all Copilot experiences on November 30, 2026
GitHub deprecated Claude Opus 4.8 (fast) on November 30, 2026. The deprecation applies across all GitHub Copilot experiences, including Copilot Chat, inline edits, ask and agent modes, and code completions.
Perplexity adds Time Machine to its APIs, letting agents search the web as it was up to 365 days ago
Perplexity has added Time Machine to its Search and Context APIs, letting AI agents see the web as it looked up to 365 days ago. The goal is to stop forecasting tests from being spoiled by hindsight. Perplexity's performance figures come from its own tests.
Anthropic Python SDK v2.13.0 marks Claude Opus 4.5 deprecated, end-of-life January 22, 2027
Anthropic released v2.13.0 of its Python SDK on 23 Nov. The release marks Claude Opus 4.5 as deprecated with an end-of-life date of January 22, 2027, and adds External Storage to the Admin API beta.
Comments
Loading...