You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You are building `@loop-engine/adapter-perplexity`, an Apache-2.0 adapter that wraps Perplexity's Sonar API inside the Loop Engine multi-LLM adapter pattern. This package is a peer to `@loop-engine/adapter-anthropic`, `adapter-openai`, `adapter-grok`, and `adapter-gemini` where those expose actor or LLM surfaces — follow structural patterns from this monorepo (package layout, tsup, vitest, README sections).
10
+
11
+
## Scope
12
+
13
+
1. **Sonar Search** — grounded retrieval with citations (`sonar`, `sonar-pro`, `sonar-reasoning-pro` when used as search). Maps to chat completions with search filters.
14
+
2. **Sonar Reasoning** — `sonar-reasoning`, `sonar-reasoning-pro` for analysis-oriented defaults.
15
+
16
+
Do **not** wrap Perplexity Computer's Agent API here; that belongs in a separate gateway package.
17
+
18
+
## Contract
19
+
20
+
- Implement `LLMAdapter` from `@loop-engine/core` (`invoke`, `guardEvidence`; `stream` optional).
21
+
- Preserve citations on the result; callers attach them to Loop evidence and run `guardEvidence` before persistence.
22
+
- Errors: `PerplexityAdapterError` / `RateLimitError`; never swallow errors.
"notes": "Do not publish to npm, activate GTM motions that claim Perplexity support, or merge public docs that list Perplexity as supported until this RC reaches LOCKED via the approved promotion workflow."
0 commit comments