opencode/packages/llm/test/provider
Kit Langton ab9b79ef88 refactor(llm): rename Usage.native to providerMetadata
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.
2026-05-10 21:42:09 -04:00
..
anthropic-messages.recorded.test.ts refactor(http-recorder): Redactor + Recorder seams, README (#26636) 2026-05-10 10:49:22 -04:00
anthropic-messages.test.ts refactor(llm): rename Usage.native to providerMetadata 2026-05-10 21:42:09 -04:00
bedrock-converse.test.ts Add native LLM core foundation (#24712) 2026-05-08 16:56:20 -04:00
cloudflare.test.ts chore: generate 2026-05-08 20:57:36 +00:00
gemini.test.ts refactor(llm): rename Usage.native to providerMetadata 2026-05-10 21:42:09 -04:00
golden.recorded.test.ts refactor(http-recorder): Redactor + Recorder seams, README (#26636) 2026-05-10 10:49:22 -04:00
openai-chat.test.ts refactor(llm): rename Usage.native to providerMetadata 2026-05-10 21:42:09 -04:00
openai-compatible-chat.test.ts Add native LLM core foundation (#24712) 2026-05-08 16:56:20 -04:00
openai-responses.test.ts refactor(llm): rename Usage.native to providerMetadata 2026-05-10 21:42:09 -04:00
openrouter.test.ts Add native LLM core foundation (#24712) 2026-05-08 16:56:20 -04:00