mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
Adds a `beforeProviderRequest` generation hook so extensions can replace the provider request body before it is sent. It is the durable counterpart of coding-agent's `before_provider_request`. Durable calls `streamSimple()`, so apps can't set provider-specific fields such as Anthropic's `thinking.display: "updates"` (#10804) without wrapping `Models`. Now it's an extension: ```ts hook(GenerationTask, { beforeProviderRequest: ({ model, payload }) => { if (model.api !== "anthropic-messages") return undefined; // change payload return { payload }; }, }) ``` |
||
|---|---|---|
| .. | ||
| group-commit.md | ||
| spec.md | ||