cloudaxe-opencode/packages/llm/test
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
..
fixtures/recordings chore: generate 2026-05-08 20:57:36 +00:00
lib
provider refactor(llm): rename Usage.native to providerMetadata 2026-05-10 21:42:09 -04:00
adapter.test.ts Add explicit LLM stream lifecycle events (#26722) 2026-05-10 12:19:13 -04:00
auth-options.types.ts
auth.test.ts
endpoint.test.ts chore: generate 2026-05-08 20:57:36 +00:00
executor.test.ts
exports.test.ts
generate-object.test.ts chore: generate 2026-05-08 20:57:36 +00:00
llm.test.ts Add explicit LLM stream lifecycle events (#26722) 2026-05-10 12:19:13 -04:00
provider.types.ts
recorded-golden.ts
recorded-runner.ts
recorded-scenarios.ts
recorded-test.ts refactor(http-recorder): hide cassette format behind Cassette seam (#26725) 2026-05-10 12:29:55 -04:00
recorded-utils.ts
recorded-websocket.ts feat(http-recorder): default mode to "auto" (#26719) 2026-05-10 16:05:11 +00:00
schema.test.ts refactor(llm): inclusive total + non-overlapping breakdown for Usage 2026-05-10 20:39:22 -04:00
tool-runtime.test.ts
tool-stream.test.ts
tool.types.ts