Skip to content

feat(llm)!: add native Perplexity Agent API support - #62

Open
Johnson-f wants to merge 7 commits into
tinyhumansai:mainfrom
Johnson-f:feat/perplexity-agent
Open

Johnson-f wants to merge 7 commits into
tinyhumansai:mainfrom
Johnson-f:feat/perplexity-agent

Conversation

@Johnson-f

@Johnson-f Johnson-f commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add a native Perplexity Agent API provider so callers can use one explicit key with a provider-qualified model, fallback models, or a preset. Preserve rich output and deliver real incremental stream events, with explicit background recovery and generated-file access.

Related issue

None.

API or behavior changes

  • Add PerplexityModel, typed configuration/options, and ProviderKind::Perplexity. Use /v1/agent, with an explicit /v1/responses creation alias.
  • Add normalized ordered output, annotations, hosted-tool results, execution status, progress, and exact reported costs. Hosted tools remain remote; application functions return to the caller.
  • Preserve custom-function IDs, original arguments, and thought signatures through explicit replay. Include a runnable Google function-replay example.
  • Add background submit/retrieve/reconnect/cancel and response-scoped file listing/download. Bound requests, reads, stream events, timeouts, and retries; do not automatically replay ambiguous creation failures.
  • Rust source compatibility: public response/tool structs gain fields and public enums gain variants. Struct literals and exhaustive matches need updates; existing serialized records remain readable through defaults. See the migration guide. No release version is changed here.

Provider limitation observed live

Direct HTTP probes independently reproduced HTTP 400 when previous_response_id references a response ending in a custom function call, for both Google and OpenAI. Even plain user follow-ups to those parents failed; completed assistant-text parents worked. Explicit full call/result replay succeeded. The adapter preserves that error without silently resubmitting or changing strategies. The exact internal provider cause is unconfirmed.

Cancellation was acknowledged as cancelling, followed by incomplete; the adapter preserves the reported status rather than treating acknowledgement as confirmed cancellation.

Validation

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo build --all-targets --all-features
  • cargo test --all-features — 1,082 passing unit, integration, and documentation tests
  • RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features
  • git diff --cached --check

Live verification covered Google /agent, OpenAI /responses, preset web search with source/citation-marker preservation, incremental text, signed function calls/replay, ordinary conversation continuation, background reconnect/retrieval, cancellation acknowledgement, and CSV generation/listing/download. cargo run -p tinyinference-llm --example perplexity_function_replay completed successfully with explicitly supplied credentials.

Rust 1.88 MSRV, default-feature-only tests, cargo-deny, and coverage measurement were not run locally. The corresponding extra toolchain/tools are not installed locally.

Tests

Offline fixtures cover request validation, known and unknown output, exact decimal cost rounding, split UTF-8/SSE frames, provisional null content/empty model fields observed live, function argument/signature preservation, authoritative snapshots, partial failures, size/deadline bounds, retry classification, credential redaction, scoped recovery handles, file access, and the public network guard.

Remote MCP/connector integrations and every model/hosted-tool combination have not been tested live.

Documentation

  • README: native provider overview.
  • docs/migrations/perplexity-agent.md: contracts, migration changes, retries, storage, and live limitations.
  • crates/tinyinference-llm/examples/perplexity_function_replay.rs: explicit signed call/result replay.

Checklist

  • The change is focused on one logical change
  • No new #[allow(...)], #[ignore], or relaxed lints
  • No secrets, tokens, or .env contents in the diff or the description

Review follow-up

Reviewed all ten inline threads (including the two duplicated lane findings) and both additional concerns in the test-lane summary against the full source. The automated reviewer reported unavailable code retrieval; several findings were based on incomplete context.

Finding Disposition and evidence
Execution progress lost during reconstruction Fixed. Preserve nonempty progress in the execution snapshot and only backfill an empty snapshot. Regression covers both snapshot and separate-event progress.
Hosted options not validated by apply_to Fixed early validation by reusing the existing hosted-tool encoder/validator. Invalid image/fetch limits now fail without mutating the request; they were already rejected before HTTP send.
Forced hosted tool missing from declarations Fixed for explicit models/fallback chains. Presets retain server-owned tool defaults, so preset-supplied tools remain usable. Tests cover both paths; preset tools merge.
Creation alias vs lifecycle endpoints Intentional: responses_alias controls creation only, with canonical Agent recovery routes. Expanded the submit/poll/cancel test to exercise alias creation followed by /agent/{id} recovery.
Empty generic default Perplexity model Intentional explicit selection. Native constructors require a model/fallback/preset; OpenAiModel::from_spec rejects Perplexity. Clarified the ProviderSpec.model rustdoc. A Sonar default would select a different API contract.
Deferred operations bypass network guard Not reproduced. All HTTP operations call Transport::send, which checks the guard. The isolated public integration test exercises invoke, stream, submit, retrieve, resume, cancel, list, download, and deferred polling.
ToolMessage literals do not compile Not reproduced. In-repository literals were updated in the original commit; the baseline PR passed Rust stable and Rust 1.88 CI. Downstream literal/exhaustive-match changes are deliberately marked breaking and documented.
Populate OpenAI rich output / Anthropic full partial_response Outside this feature's accepted scope. Existing adapters keep their prior behavior and initialize the new optional fields; this PR does not migrate their output mapping. Perplexity populates the full rich/partial response contracts.
Integration test leaks the network flag Not reproduced. tests/perplexity_api.rs is a separate Cargo integration-test binary containing one test. Other integration files and unit tests execute in different processes. No concurrent unrelated case shares this process.
Slow send/upload bypasses the total deadline Not reproduced. timeout_at(deadline, work) wraps the entire send/retry future. Added a paused-clock regression proving a pending transport send is cancelled at the request deadline.
Reconnect discards replayed activity Intentional cursor semantics: emit only events after starting_after, with a complete authoritative terminal response. The existing reconnect regression verifies old events are skipped, new deltas survive, and the final answer is complete.

All five required local checks passed again after these changes (1,082 tests). No live paid calls were needed for this follow-up. Review threads have not been manually marked resolved.

@tinysweeper

tinysweeper Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Tiny Sweeper review

Findings

No active actionable findings.

Advisory notes

  • medium: Merge accumulated progress into execution regardless of emptiness ((pull request description))
    Problem: The new reconciliation only backfills `execution.progress` from the accumulator when the terminal `Completed` response's own `progress` list is empty. A provider that emits `Output
    Suggested fix:
    No concrete fix was supplied.
  • medium: Merge accumulated progress in the reconstruction branch too ((pull request description))
    Problem: Same shape as the `Completed` branch above but on the fallback reconstruction path: an `Execution` event that carried its own non-empty `progress` list causes the accumulator's sep
    Suggested fix:
    No concrete fix was supplied.

Resolved this pass

  • Use the configured endpoint when retrieving responses
  • Provide a valid default Perplexity model
  • Preserve execution progress in reconstructed responses
  • Guard every deferred request against network denial
  • Validate every hosted tool before serialization
  • Populate the partial response on stream failure
  • Require forced hosted tools to be declared
  • Update all ToolMessage literals for the new required field
  • Populate normalized Responses output and execution metadata
  • Restore the network guard after the test
  • Provide a usable default Perplexity model
  • Reject explicit tools that shadow system tools
  • Use the configured endpoint when retrieving responses
  • Provide a valid default Perplexity model
  • Preserve execution progress in reconstructed responses
  • Guard every deferred request against network denial
  • Validate every hosted tool before serialization
  • Populate the partial response on stream failure
  • Require forced hosted tools to be declared
  • Update all ToolMessage literals for the new required field
  • Populate normalized Responses output and execution metadata
  • Restore the network guard after the test
  • Provide a usable default Perplexity model
  • Reject explicit tools that shadow system tools
  • Update all ToolMessage literals for the new required field
  • Provide a valid default Perplexity model
  • Populate normalized Responses output and execution metadata
  • Use the configured endpoint when retrieving responses
  • Provide a valid default Perplexity model
  • Preserve execution progress in reconstructed responses
  • Guard every deferred request against network denial
  • Validate every hosted tool before serialization
  • Populate the partial response on stream failure
  • Require forced hosted tools to be declared
  • Update all ToolMessage literals for the new required field
  • Populate normalized Responses output and execution metadata
  • Restore the network guard after the test
  • Provide a usable default Perplexity model
  • Reject explicit tools that shadow system tools
  • Use the configured endpoint when retrieving responses
  • Provide a valid default Perplexity model
  • Preserve execution progress in reconstructed responses
  • Guard every deferred request against network denial
  • Validate every hosted tool before serialization
  • Populate the partial response on stream failure
  • Require forced hosted tools to be declared
  • Update all ToolMessage literals for the new required field
  • Populate normalized Responses output and execution metadata
  • Restore the network guard after the test
  • Provide a usable default Perplexity model
  • Reject explicit tools that shadow system tools
  • Use the configured endpoint when retrieving responses
  • Require forced hosted tools to be declared
  • Reject explicit tools that shadow system tools
  • Validate every hosted tool before serialization
  • Populate the partial response on stream failure
  • Update all ToolMessage literals for the new required field
  • Populate normalized Responses output and execution metadata
  • Guard every deferred request against network denial
  • Restore the network guard after the test
  • Provide a valid default Perplexity model

Verdict: Incomplete · Priority: none
Coverage: Reviewed 33 of 47 files; not reviewed: Cargo.lock; not reviewed (large PR): crates/tinyinfer…, crates/tinyinfer…, and 11 additional unreviewed files.

Diagnostics and supporting details

Full summary

Pull request purpose (title): feat(llm)!: add native Perplexity Agent API support. The description frames it as adding a native Perplexity Agent provider so callers use one explicit key with a provider-qualified model, fallback models, or a preset, preserving rich output and delivering real incremental stream events with explicit background recovery and generated-file access. The tests lane reported no new blocking defect in the incremental diff but flagged that live provider behaviours remain unverified; the description lane reports one remaining finding and two earlier findings still open; the commits lane reports no sensitive content in committed files while 13 earlier findings remain open.

Unreviewed paths

  • Cargo.lock
  • crates/tinyinference-llm/src/failure_tests.rs
  • crates/tinyinference-llm/src/lib.rs
  • crates/tinyinference-llm/src/model/error_slot_tests.rs
  • crates/tinyinference-llm/src/model/mod_tests.rs
  • crates/tinyinference-llm/src/model/response_conversion.rs
  • crates/tinyinference-llm/src/model/types.rs
  • crates/tinyinference-llm/src/providers/anthropic/mod.rs
  • crates/tinyinference-llm/src/providers/anthropic/mod_tests.rs
  • crates/tinyinference-llm/src/providers/mod.rs
  • crates/tinyinference-llm/src/providers/openai/convert.rs
  • crates/tinyinference-llm/src/providers/openai/mod_tests.rs
  • crates/tinyinference-llm/src/providers/openai/sse.rs
  • crates/tinyinference-llm/src/providers/tinyhumans/usage_tests.rs

Partial review reasons

  • critique: crates/tinyinference-llm/src/failure_tests.rs — not selected by the large-review budget
  • security: crates/tinyinference-llm/src/failure_tests.rs — not selected by the large-review budget
  • critique: crates/tinyinference-llm/src/lib.rs — not selected by the large-review budget
  • security: crates/tinyinference-llm/src/lib.rs — not selected by the large-review budget
  • critique: crates/tinyinference-llm/src/model/error_slot_tests.rs — not selected by the large-review budget
  • security: crates/tinyinference-llm/src/model/error_slot_tests.rs — not selected by the large-review budget
  • critique: crates/tinyinference-llm/src/model/mod_tests.rs — not selected by the large-review budget
  • security: crates/tinyinference-llm/src/model/mod_tests.rs — not selected by the large-review budget
  • critique: crates/tinyinference-llm/src/model/response_conversion.rs — not selected by the large-review budget
  • security: crates/tinyinference-llm/src/model/response_conversion.rs — not selected by the large-review budget
  • critique: crates/tinyinference-llm/src/model/types.rs — not selected by the large-review budget
  • critique: crates/tinyinference-llm/src/providers/anthropic/mod.rs — not selected by the large-review budget
  • security: crates/tinyinference-llm/src/providers/anthropic/mod.rs — not selected by the large-review budget
  • critique: crates/tinyinference-llm/src/providers/anthropic/mod_tests.rs — not selected by the large-review budget
  • security: crates/tinyinference-llm/src/providers/anthropic/mod_tests.rs — not selected by the large-review budget
  • critique: crates/tinyinference-llm/src/providers/mod.rs — not selected by the large-review budget
  • security: crates/tinyinference-llm/src/providers/mod.rs — not selected by the large-review budget
  • critique: crates/tinyinference-llm/src/providers/openai/convert.rs — not selected by the large-review budget
  • security: crates/tinyinference-llm/src/providers/openai/convert.rs — not selected by the large-review budget
  • critique: crates/tinyinference-llm/src/providers/openai/mod_tests.rs — not selected by the large-review budget
  • security: crates/tinyinference-llm/src/providers/openai/mod_tests.rs — not selected by the large-review budget
  • critique: crates/tinyinference-llm/src/providers/openai/sse.rs — not selected by the large-review budget
  • security: crates/tinyinference-llm/src/providers/openai/sse.rs — not selected by the large-review budget
  • critique: crates/tinyinference-llm/src/providers/tinyhumans/usage_tests.rs — not selected by the large-review budget
  • security: crates/tinyinference-llm/src/providers/tinyhumans/usage_tests.rs — not selected by the large-review budget

Review snapshot

Change surface Files Review signal Count
Production 27 Active findings 0
Tests 16 Noted findings 2
Documentation 2 Resolved findings 61
Configuration 1 Pending checks/questions 38

Completeness: Incomplete
Test assessment: Test coverage is assessed from changed tests and lane evidence; execution is not claimed without trusted check data.

What changed

The change adds a native Perplexity Agent provider: `PerplexityModel` is built from an explicit key plus a `PerplexitySelection`, defaults to the `/v1/agent` creation route with an optional `/v1/responses` creation alias, and keeps retrieval, reconnect, cancel and file routes on the canonical Agent paths. Responses gain ordered `output` and `execution` metadata; streams gain an `OutputEvent` channel and retain progress; provider errors gain `partial_response`; `DeferredStatus` gains structured provider-failure and cancellation states; tool calls and tool messages gain replay/context fields; and `ProviderKind::Perplexity` is added, with the OpenAI-compatible constructor rejecting Perplexity specs. Hosted MCP, search and sandbox activity stays remote, application functions are returned to the caller with original argument bytes and thought signatures, and the adapter performs no local file writes or tool execution. Background submit/retrieve/resume/cancel and response-scoped file listing/download are added with bounded sizes, timeouts and retry classification that retries creation only on explicit rate limits. The OpenAI Responses adapter now populates ordered output and execution metadata. Latest-push-delta: unavailable — the evidence provides the prior reviewed head `00380d5f2dc9` and the current head `d18a99731f1f`, but states there is no trusted base-to-head diff comparison, so no push delta is reported here; the whole-pull-request behavior above is not a push delta.

Features

  • Added — Native Perplexity Agent provider with explicit model, fallback and preset selection: Callers can select a provider-qualified model, a fallback chain, or a server-managed preset, with validation of blank names, more than five fallbacks, and ambiguous model-override-plus-fallback combinations, and with an Anthropic selection requiring a positive output cap. (crates/tinyinference-llm/src/providers/perplexity/config.rs, crates/tinyinference-llm/src/providers/perplexity/mod.rs, crates/tinyinference-llm/src/lib.rs)
  • Added — Canonical Agent routes with a creation-only responses alias: Creation can use `/v1/responses`, while retrieval, reconnect, cancellation and file operations always use `/v1/agent`, so recovery never depends on the alias. (crates/tinyinference-llm/src/providers/perplexity/lifecycle.rs, crates/tinyinference-llm/src/providers/perplexity/lifecycle_tests.rs)
  • Added — Typed rich output and execution metadata: `ModelResponse.output` preserves ordered items with annotations, search sources, hosted image/fetch/finance/sandbox activity, remote tool discovery and calls, and generated-file notices, while `execution` carries response ID, actual model, status, reconnect cursor, reported costs and tool usage without local pricing. (crates/tinyinference-llm/src/model/output.rs, crates/tinyinference-llm/src/model/types.rs, crates/tinyinference-llm/src/providers/perplexity/response.rs)
  • Added — Background lifecycle and generated-file access: Background work is submitted as a serializable, endpoint-scoped handle that can be retrieved, reconnected after a cursor, and cancelled, with files listed and explicitly downloaded into bounded memory by file ID rather than filename-derived paths; a failed download or expired reconnect never regenerates the run. (crates/tinyinference-llm/src/providers/perplexity/lifecycle.rs, crates/tinyinference-llm/src/providers/perplexity/types.rs)
  • Added — Documentation, migration guide and runnable function-replay example: The README documents provider usage, the migration guide records contracts, limits, retries, storage semantics and the breaking Rust literal variants, and the example demonstrates replaying a signed Google function result through Perplexity. (README.md The workspace provides:, docs/migrations/perplexity-agent.md, crates/tinyinference-llm/examples/perplexity_function_replay.rs)

Tests

  • unit — Request construction is exercised for preset defaults, hosted-tool validation, forced hosted-tool declaration requirements, system-tool shadowing, Anthropic output caps, structured output and documents, remote credential binding and non-serialization, and signed call/result replay plus rejected unmatched or duplicate results.: Tests lane answered; these fixtures assert request bodies and error kinds. This corroborates the stated behavior without proving execution in this review. (crates/tinyinference-llm/src/providers/perplexity/request_tests.rs)
  • unit — Response parsing is exercised for source/citation/cost preservation, all documented hosted output kinds round-tripping, malformed known items retaining prior rich output, non-success statuses not reported as success, and micro-unit cost rounding boundaries.: Tests lane answered; assertions cover request/response contracts. Execution is not independently verified here. (crates/tinyinference-llm/src/providers/perplexity/response_tests.rs)
  • unit — Background lifecycle is exercised for alias creation with canonical recovery routes, file listing and download by file ID with traversal-like filenames, foreign handles and invalid IDs failing without requests, oversized or failed downloads not regenerating the run, reconnect cursor semantics, expired reconnect, and terminal incomplete/failed states.: Tests lane answered; route and error-code assertions are present. Execution is not independently verified here. (crates/tinyinference-llm/src/providers/perplexity/lifecycle_tests.rs)
  • unit — Stream and migration behavior is exercised for output-event folding, progress backfill from execution snapshots, terminal-outcome observation, and stream-item serialization round-tripping; OpenAI Responses parsing tests cover ordered output, malformed function arguments and absent execution identity.: Tests lane answered; these cover the shared model surface as well as provider parsing. Execution is not independently verified here. (crates/tinyinference-llm/src/model/output_tests.rs, crates/tinyinference-llm/src/model/migration_tests.rs, crates/tinyinference-llm/src/providers/openai/responses_tests.rs)

Before merge

  • Complete the critique review for crates/tinyinference-llm/src/model/types.rs, crates/tinyinference-llm/src/lib.rs, crates/tinyinference-llm/src/providers/mod.rs, crates/tinyinference-llm/src/providers/openai/mod_tests.rs, crates/tinyinference-llm/src/model/response_conversion.rs, crates/tinyinference-llm/src/providers/openai/sse.rs, crates/tinyinference-llm/src/providers/anthropic/mod_tests.rs, crates/tinyinference-llm/src/model/mod_tests.rs, crates/tinyinference-llm/src/providers/openai/convert.rs, crates/tinyinference-llm/src/failure_tests.rs, crates/tinyinference-llm/src/model/error_slot_tests.rs, crates/tinyinference-llm/src/providers/tinyhumans/usage_tests.rs, crates/tinyinference-llm/src/providers/anthropic/mod.rs.
  • Complete the security review for crates/tinyinference-llm/src/lib.rs, crates/tinyinference-llm/src/providers/mod.rs, crates/tinyinference-llm/src/providers/openai/mod_tests.rs, crates/tinyinference-llm/src/model/response_conversion.rs, crates/tinyinference-llm/src/providers/openai/sse.rs, crates/tinyinference-llm/src/providers/anthropic/mod_tests.rs, crates/tinyinference-llm/src/model/mod_tests.rs, crates/tinyinference-llm/src/providers/openai/convert.rs, crates/tinyinference-llm/src/failure_tests.rs, crates/tinyinference-llm/src/model/error_slot_tests.rs, crates/tinyinference-llm/src/providers/tinyhumans/usage_tests.rs, crates/tinyinference-llm/src/providers/anthropic/mod.rs.
  • Review uncovered paths: crates/tinyinference-llm/src/failure_tests.rs, crates/tinyinference-llm/src/lib.rs, crates/tinyinference-llm/src/model/error_slot_tests.rs, crates/tinyinference-llm/src/model/mod_tests.rs, crates/tinyinference-llm/src/model/response_conversion.rs, crates/tinyinference-llm/src/model/types.rs, crates/tinyinference-llm/src/providers/anthropic/mod.rs, crates/tinyinference-llm/src/providers/anthropic/mod_tests.rs, crates/tinyinference-llm/src/providers/mod.rs, crates/tinyinference-llm/src/providers/openai/convert.rs, crates/tinyinference-llm/src/providers/openai/mod_tests.rs, crates/tinyinference-llm/src/providers/openai/sse.rs, crates/tinyinference-llm/src/providers/tinyhumans/usage_tests.rs.
Agent review details

critique

  • Conclusion: Neutral
  • Scope reviewed: incomplete; unanswered files: crates/tinyinference-llm/src/model/types.rs, crates/tinyinference-llm/src/lib.rs, crates/tinyinference-llm/src/providers/mod.rs, crates/tinyinference-llm/src/providers/openai/mod_tests.rs, crates/tinyinference-llm/src/model/response_conversion.rs, crates/tinyinference-llm/src/providers/openai/sse.rs, crates/tinyinference-llm/src/providers/anthropic/mod_tests.rs, crates/tinyinference-llm/src/model/mod_tests.rs, crates/tinyinference-llm/src/providers/openai/convert.rs, crates/tinyinference-llm/src/failure_tests.rs, crates/tinyinference-llm/src/model/error_slot_tests.rs, crates/tinyinference-llm/src/providers/tinyhumans/usage_tests.rs, crates/tinyinference-llm/src/providers/anthropic/mod.rs
  • Lane summary: Reviewed 8 of 21 files — 13 not reviewed. Reviewed 8 files; 2 findings. 13 files were omitted: not selected by the large-review budget.

security

  • Conclusion: Neutral
  • Scope reviewed: incomplete; unanswered files: crates/tinyinference-llm/src/lib.rs, crates/tinyinference-llm/src/providers/mod.rs, crates/tinyinference-llm/src/providers/openai/mod_tests.rs, crates/tinyinference-llm/src/model/response_conversion.rs, crates/tinyinference-llm/src/providers/openai/sse.rs, crates/tinyinference-llm/src/providers/anthropic/mod_tests.rs, crates/tinyinference-llm/src/model/mod_tests.rs, crates/tinyinference-llm/src/providers/openai/convert.rs, crates/tinyinference-llm/src/failure_tests.rs, crates/tinyinference-llm/src/model/error_slot_tests.rs, crates/tinyinference-llm/src/providers/tinyhumans/usage_tests.rs, crates/tinyinference-llm/src/providers/anthropic/mod.rs
  • Lane summary: Reviewed 8 of 20 files — 12 not reviewed. Reviewed 8 files; 0 findings. 12 files were omitted: not selected by the large-review budget. 1 file was not security-reviewed: docs/migrations/perplexity-agent.md (prose or tabular data).

tests

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: Tests lane answered and judged the concrete behaviors flagged in earlier rounds — endpoint pinning, selection validation, the network guard on public operations including `fetch_deferred`, configurable retries, declared hosted-tool selection, transient error marking, and response/id leak fixes — to now be present and covered, while noting the live provider behaviours the migration doc flags as unconfirmed.
  • Lane summary: This revision addresses the previously raised concerns: the network guard now covers `fetch_deferred` and every public Perplexity operation (`perplexity_api.rs#every_public_network_operation_obeys_the_host_network_guard`), `Project`/`ProviderSpec` now rejects Perplexity specs explicitly (`perplexity_provider_spec_never_builds_a_model_without_an_explicit_selection`), `StreamAccumulator` now retains `OutputEvent` execution/output/progress (covered by `output_tests.rs#reconstruction_preserves_progress_supplied_in_execution_snapshots`), `partial_response` is populated on OpenAI/Anthropic stream failures and asserted in `mod_tests.rs` and `anthropic/mod_tests.rs`, the forced-hosted-tool and system-tool shadowing paths are now covered by `request_tests.rs`, and the `ToolMessage`/`ProviderError`/`ModelResponse` literal updates are complete across the crates touched here. I found no new blocking defect in the incremental diff; the remaining concerns I could not verify from these commits are the live provider behaviours the migration doc itself flags as unconfirmed. _The code index is behind this pull request (indexed at `00380d5f2dc9`), so retrieved context may be out of date._

commits

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: Commits lane answered: no sensitive content in committed files, while 13 earlier findings remain open.
  • Lane summary: No sensitive content in committed files. (13 earlier finding(s) still open) _The code index is behind this pull request (indexed at `00380d5f2dc9`), so retrieved context may be out of date._

description

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: Description lane answered: the prior findings against the Perplexity adapter are addressed in the current head — endpoint regression, forced-hosted-tool declaration rule, shadowed system tool, hosted-tool pre-serialization validation, rich-output/partial-response population for Perplexity, and the tool-literal compile breaks. One finding remains and two earlier findings are still open.
  • Lane summary: This revision is the Perplexity Agent API feature plus a follow-up that adds `ModelResponse.output`/`execution`, `ProviderError.partial_response`, `ToolCall.replay`, `ToolMessage.call_context`, `ModelStreamItem::OutputEvent`, and the new `DeferredStatus` variants, updating the in-repo literals accordingly. The prior findings against the Perplexity adapter are addressed in the current head: the endpoint regression, the forced-hosted-tool declaration rule, the shadowed system tool, the hosted-tool pre-serialization validation, the rich-output/partial-response population for Perplexity, and the tool-literal compile breaks all hold up under reading. One finding remains: the newly added `StreamAccumulator` merge path in `finish()` can silently discard stream-only progress for providers that emit a terminal response carrying a non-empty execution-progress list. The default Perplexity model question is a design decision the author documents explicitly; the deferred network guard is unreachable through `Transport::send`; and the OpenAI Responses output wiring is now populated in this head. (2 earlier finding(s) still open) _The code index is behind this pull request (indexed at `00380d5f2dc9`), so retrieved context may be out of date._
Evidence and run details
  • Models: ladder/vectors-oai3, deepseek-v4.1-flash
  • Spend: $0.055956
  • Tokens: 1365950 input · 15737 output · 398080 cached · 736 embedding
  • Updated: 2026-10-29T10:53:35Z
  • Continuity: summary cache chain restarted at the storage ceiling.
Head State Pass summary
c8441a1ec488 incomplete 12 active finding(s), 0 resolved finding(s) (at 2026-10-04T19:31:32Z)
4ace3d32a466 changes requested 5 active finding(s), 141 resolved finding(s) (at 2026-10-05T15:16:27Z)
00380d5f2dc9 incomplete 0 active finding(s), 36 resolved finding(s) (at 2026-10-29T10:36:22Z)
d18a99731f1f incomplete 0 active finding(s), 61 resolved finding(s) (at 2026-10-29T10:53:35Z)

tinysweeper 0.1.2

@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a9714db1-53e5-437d-98f7-d2e7e22441c7
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@Johnson-f

Copy link
Copy Markdown
Contributor Author

@senamakel pls review

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes: 2 lane(s) blocking, worst finding is critical.

Fix or reply to the findings below and push. The next review clears this automatically once they are gone — you should not need to dismiss anything by hand.

             $0.0731 · 1,237,432 in / 56,882 out · 96,922 cached (8%)  · gpt-5.6-luna, glm-5.3-flash, , gpt-6-luna
critique:    $0.0480 · 673,614 in   / 36,421 out · 61,146 cached (9%)  · gpt-5.6-luna, glm-5.3-flash,
security:    $0.0200 · 292,907 in   / 14,956 out · 35,776 cached (12%) · gpt-5.6-luna
tests:       $0.0008 · 87,709 in    / 1,465 out  · 0 cached (0%)       · glm-5.3-flash
description: $0.0008 · 87,349 in    / 80 out     · 0 cached (0%)       · glm-5.3-flash

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes: 2 lane(s) blocking, worst finding is high.

Fix or reply to the findings below and push. The next review clears this automatically once they are gone — you should not need to dismiss anything by hand.

             $0.0516 · 953,109 in / 59,743 out · 62,840 cached (7%) · gpt-5.6-luna, glm-5.3-flash, deepseek-v4.1-flash
critique:    $0.0227 · 373,734 in / 23,986 out · 34,580 cached (9%) · gpt-5.6-luna, glm-5.3-flash
security:    $0.0196 · 307,923 in / 23,321 out · 26,852 cached (9%) · gpt-5.6-luna
tests:       $0.0000 · 85,561 in  / 229 out    · 1,408 cached (2%)  · deepseek-v4.1-flash
description: $0.0091 · 89,644 in  / 9,460 out  · 0 cached (0%)      · glm-5.3-flash

@senamakel senamakel self-assigned this Oct 11, 2026
Johnson-f and others added 4 commits October 29, 2026 11:35
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nctions

Forced hosted tool choices must now be declared in PerplexityOptions.tools
even with a preset, and an explicit function may not redefine a
system-declared tool of the same name. Lifecycle routes are documented as
always using the canonical /agent collection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… guard

Lifecycle calls share one RESOURCE_COLLECTION constant for the canonical
/agent routes, the Perplexity ProviderSpec documents why its model is empty
and is pinned by a test, and the integration test restores the network
guard on drop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tinysweeper could not complete coverage (6 unanswered item(s)), so this is not an approval.

Diagnostics

Total spend: $0.0258

Resolve conflicts with the 0.5.0 line: keep upstream's dependency set
(dropping the unused sha2) plus the raw_value feature and http
dev-dependency Perplexity needs, export both the new dispatch/finish-reason
APIs and the output types, and keep canonical finish reasons alongside the
full partial response on stream failures. Upstream's new response
conversion and tests now initialize the output, execution, and replay
fields this branch added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Johnson-f

Copy link
Copy Markdown
Contributor Author

everything's fixed @senamakel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants