Skip to content

Feature Bundle Request: Explicit Prompt Caching, Multi-Model Fusion, and Granular API Key Controls #60

Description

@Codekies

Feature Bundle Request: Explicit Prompt Caching, Multi-Model Fusion, and Granular API Key Controls

1. Feature Request: Support for Explicit Prompt Caching (cache_control)

Feature Description

We would like to request explicit support for user-controlled prompt caching parameters (such as Anthropic's cache_control headers or OpenRouter-equivalent sticky routing hooks) within the Perplexity API endpoints.

Core Problem & Use Case

When deploying complex AI workflows or specialized developer agents via the Perplexity API platform, we frequently pass massive context strings—such as extensive code repositories, complete API documentation, system constraints, or long-context enterprise guidelines—repeatedly across multiple chat turns.

Currently, because the API standardizes and hides provider-level caching properties, developers are forced to pay full flat rates for identical input prefixes on every single multi-turn transaction. This lack of exposed ephemeral token tracking heavily inflates development overhead for dense context processing.

Suggested Implementation

  1. Expose Cache Control Properties: Allow the standard request body to pass parameters like "cache_control": {"type": "ephemeral"} down to underlying partner models (like Claude) that natively support explicit cache breakpoints.
  2. Transparent Billing Logs: Expose cached_tokens and cache_write_tokens inside the returned usage metadata block so developers can audit cache efficiency dynamically.
  3. Session Sticky Routing: Maintain connection stickiness to the specific background model host instance when a valid session token or continuous cache snapshot is active.

2. Feature Request: Implementation of a Multi-Model "Model Council / Fusion Plugin" Endpoint

Feature Description

I am requesting an advanced orchestration feature: a native multi-model evaluation framework (similar to "Fusion" or "Model Council" systems), where multiple flagship LLMs from separate labs can evaluate a query concurrently, followed by a final judge model aggregating their distinct insights.

Core Problem & Use Case

When querying high-stakes engineering, complex mathematical proofs, or strategic industry analysis via the Perplexity API, a single model—even when utilizing internal search agents—is prone to localized blind spots, premature rounding errors, or semantic drift.

While the sonar family is exceptional at combining live search with synthesis, it limits the user to a singular model's logical lane for the final generation block. Managing multiple raw instances manually via client-side code introduces massive network latency, dual API key management overhead, and synchronization bottlenecks.

Suggested Implementation

  1. Fusion Array Parameter: Allow developers to define an array of background models to be invoked simultaneously for a single query (e.g., ["anthropic/claude-3-5-sonnet", "openai/gpt-4o"]).
  2. Dedicated Judge Mapping: Allow specification of a top-tier agentic model (e.g., a reasoning-focused tier) tasked purely with compiling, cross-referencing, and generating the ultimate unified response string.
  3. Comparative Schema: Provide clear markers in the streaming chunks showing consensus points, explicit logical contradictions found between models, and unique isolated arguments.

3. Feature Request: Enterprise-Grade API Key Controls (Granular Budgeting and Model Locking)

Feature Description

We need the ability to configure granular security restrictions, automated spending caps, and strict model-level permissions for individual API keys within the Perplexity API Developer Console.

Core Problem & Use Case

Currently, the developer dashboard provides a master API Key framework. If an application key is inadvertently exposed, or if an autonomous agent runs into an asynchronous infinite loop (runaway code cycle), the global account credit pool can be entirely drained within minutes.

Furthermore, when sharing API access with internal staging environments, automated testing suites, or clients, it is impossible to prevent them from calling highly expensive reasoning/deep-research endpoints, which heavily strains budget predictability.

Suggested Implementation

  1. Per-Key Monetary Budgets: Implement the option to assign hard spending limits (e.g., Max $10 per day/week/month) to specific API keys that automatically cut off execution when breached.
  2. Strict Model Whitelisting: Enable a togglable menu on each generated key to specify exactly which models it is authorized to call (e.g., lock a key to lightweight models and completely ban the invocation of premium reasoning/agentic models).
  3. Workspace/Project Segregation: Allow developers to partition balances cleanly between separate test project scopes without forcing the creation of multiple distinct Perplexity corporate accounts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions