ZICQ
中 Log in / Sign up
Newsroom Official Agentic #Perplexity #Agent API #Code Mode #Sandbox #Tool Orchestration

Perplexity High Effort Switches to Code Mode for Programmatic Tool Orchestration

Avatar of Mr.Xu

By Mr.Xu Compiled & Reviewed by Editorial

Published:

中文阅读 (Chinese) English Version
Co-reading Select any sentence in the article to highlight, annotate, or copy a quote card. Join discussion ↓

Summary:Perplexity now routes the Agent API's `high` effort level to `[email protected]`, enabling Code Mode instead of the previous direct-tool-call path. The model can orchestrate `web_search`, `fetch_url`, and `sandbox` inside generated programs, and responses may include `program` and `program_output` items. The compatibility changes are material: the 40-tool-call cap is removed while the 40-step cap remains; sandbox container time is billable; and `snapshot_as_of` on `web_search` returns HTTP 400


Scope of the Change

Perplexity now maps the Agent API's high effort level to [email protected] by default. The model itself has not changed, and the medium effort level remains unchanged. The substantive update is the agent's tool-execution protocol: direct tool calls are replaced by a model-generated program that orchestrates those tools.

A response may now contain program and program_output items. By default, web_search, fetch_url, and sandbox are invoked from within programs, and requests no longer need to include programmatic_tool_calling. Once a sandbox container starts, its running time is billable.

Four compatibility changes are material:

  • If a request does not list web_search or fetch_url, the previous request-level search_type, max_tokens, max_tokens_per_page, and max_urls values no longer apply. Each program configures its own search and fetch behavior.
  • The 40-tool-call limit per run is removed, while the 40-step limit remains.
  • Under Code Mode, a web_search request that sets snapshot_as_of returns HTTP 400. This restriction applies to high, xhigh, and ultra.
  • Requests that require direct tool calls and the earlier limits can pin high to [email protected].

Mechanism: From Tool Calls to Program Orchestration

With direct tool calling, the model emits a tool request in each turn, the host executes it, and the result is returned to the model. Code Mode elevates this process to program-level control flow: the model generates a program, and that program performs conditional search, page-fetching, and sandbox operations before returning results through program_output.

The change moves orchestration logic from a sequence of fixed tool calls into dynamically generated code. It can express loops, conditional branches, and intermediate-data processing, potentially reducing round trips between the model and the tool host. This is not guaranteed, however: the benefit depends on generated-code correctness, tool latency, and whether the program launches expensive sandbox work.

The API boundary changes as well. Clients must parse program and program_output, rather than assuming every model turn produces a conventional tool event. They also need to distinguish program-level failures from individual tool failures. programmatic_tool_calling is no longer required to enable this path, but developers should still verify that a request actually targets the intended version instead of relying only on an effort-level label.

The 40-step and 40-tool-call limits operate at different granularities. Steps constrain agent execution phases, while tool calls count external requests. Removing the call cap means one program can still issue many searches or fetches during a single step. The step limit can prevent an endless phase loop, but it cannot by itself cap request volume, sandbox duration, or spending.

Engineering Trade-offs and Measured Performance

The main benefit of Code Mode is stronger programmatic control, not a new model or reasoning algorithm. It fits workflows involving iterative retrieval, conditional fetching, result filtering, and sandbox computation, but introduces several costs:

  1. Cost exposure: Sandbox container time is billable. A program containing retries, long-running jobs, or loops can multiply the final bill.
  2. Reliability: Generated programs may fail because of type errors, missing exception handling, unavailable dependencies, or invalid tool parameters. The retained step limit does not replace per-run timeouts, budgets, and circuit breakers.
  3. Security: Generated programs should be treated as untrusted input. Even with a managed sandbox, production systems should not assume that its network egress, filesystem access, or credential isolation meets internal requirements, particularly when tasks involve private data.

Perplexity disclosed no task-success rate, P50 or P95 latency, token consumption, tool-call count, error rate, or cost per completed task. It also provided no same-task comparison between Code Mode and direct tool calling. Consequently, the update cannot be assumed to be faster or cheaper. Since the underlying model is unchanged, any observed difference is more likely to come from orchestration, tool sequencing, and sandbox overhead than from improved model capability.

A useful A/B test should keep the model, task set, and search corpus fixed, then compare [email protected] with [email protected]. Relevant metrics include task completion, end-to-end latency, tokens, tool calls, program-execution errors, and sandbox seconds. Only this comparison can show whether programmatic orchestration actually lowers cost per successful task.

Developer Migration and Deployment Recommendations

  1. Build a compatibility layer: Accept traditional tool events, program, and program_output in the response parser. Do not assume that a model turn contains only one tool result.
  2. Pin versions for gradual rollout: Keep production traffic on [email protected] while moving selected workloads to Code Mode. Explicit version pinning prevents an effort-level update from silently changing live behavior.
  3. Audit search controls: Do not rely on the old request-level max_tokens or max_urls settings. Set search and fetch budgets inside every program, and test the defaults used when those controls are omitted.
  4. Enforce runtime budgets: Add per-task program timeouts, sandbox-duration caps, spending alerts, and tool-call rate limits. Log which tools each program starts so that abnormal loops are not mistaken for legitimate long-running work.
  5. Handle Time Machine explicitly: Pin high requests that depend on snapshot_as_of to [email protected]. Because xhigh and ultra have the same HTTP 400 restriction, Time Machine should not be a hard dependency for those levels until a compatible path is documented.
  6. Add adversarial regression tests: Exercise malicious-page prompt injection, repeated fetching, oversized outputs, sandbox-escape boundaries, and credential access. Preserve program and tool traces even when a call fails, so model-planning errors can be separated from runtime faults.

The central update is not simply that a model can produce more code. It replaces the tool control plane with an executable programmatic interface. That gives complex agent workflows greater expressive power, while shifting governance from direct-call counts toward program execution, sandbox duration, and version compatibility.


Source: Perplexity Changelog (2026-12-03)

— END —

Tags: #Perplexity #Agent API #Code Mode #Sandbox #Tool Orchestration

Editorial & Fact-Checking Note: This article is compiled from primary research, official release documentation, and source papers by the ZICQ Newsroom pipeline with automated entity verification and human editorial review. If you notice any technical inaccuracy, please submit a correction via our corrections policy or email our editorial desk directly.

What's your take on this story?
Explore & Submit Works

Community Comments

Loading live comments and annotations…