mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-25 23:15:18 +00:00
Aligns the escape-hatch field name with `LLMEvent.providerMetadata` used
elsewhere in this package (and with AI SDK / pydantic-ai / LangChain
conventions for the same idea). Two parallel escape hatches having
different names was a wart.
The raw payload is now wrapped under the provider key — `{ openai: ... }`,
`{ anthropic: ... }`, `{ google: ... }`, `{ bedrock: ... }` — using the
existing `ProviderMetadata = Record<string, Record<string, unknown>>`
schema rather than a flat record. Same shape as
`LLMEvent.providerMetadata`, so consumers downstream can read both with
the same code.
Anthropic's `mergeUsage` merges the per-provider sub-record across
`message_start` and `message_delta` instead of spreading at the top level.
|
||
|---|---|---|
| .. | ||
| anthropic-messages.recorded.test.ts | ||
| anthropic-messages.test.ts | ||
| bedrock-converse.test.ts | ||
| cloudflare.test.ts | ||
| gemini.test.ts | ||
| golden.recorded.test.ts | ||
| openai-chat.test.ts | ||
| openai-compatible-chat.test.ts | ||
| openai-responses.test.ts | ||
| openrouter.test.ts | ||