mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
Anthropic can keep a conversation on the server (message threads beta). A request can then continue from the previous reply and send only the new messages, instead of the whole history every turn. pi uses this when a session id is set and caching is on. It still builds the full request, compares it with the previous one, and only sends the new part if nothing earlier changed. - Default: on only for the anthropic provider on api.anthropic.com. Gateways that drop unknown fields would lose the conversation. Override with compat.supportsMessageThreads. - If the server rejects a continuation, pi resends the full request as a new thread. Other errors turn threads off for the session. - New option StreamOptions.disableContinuation. The cache warmer sets it so warm requests don't replace the session's thread. - cleanupSessionResources(sessionId) frees a session's thread state. |
||
|---|---|---|
| .. | ||
| api | ||
| auth | ||
| compat | ||
| providers | ||
| utils | ||
| bedrock-provider.ts | ||
| bun-oauth.ts | ||
| cli.ts | ||
| compat.ts | ||
| env-api-keys.ts | ||
| image-models.ts | ||
| images-api-registry.ts | ||
| images.ts | ||
| index.ts | ||
| legacy-api-aliases.ts | ||
| model-catalog.ts | ||
| models-store.ts | ||
| models.generated.ts | ||
| models.ts | ||
| oauth.ts | ||
| session-resources.ts | ||
| telemetry.ts | ||
| types.ts | ||