mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-22 02:03:42 +00:00
feat(ai): add generic metadata field to StreamOptions, closes #1384
Add metadata?: Record<string, unknown> to StreamOptions so providers can extract fields they understand. Anthropic provider extracts user_id for abuse tracking and rate limiting. Other providers ignore it. Based on #1384 by @7Sageer, reworked to use a generic type instead of Anthropic-specific typing on the base interface.
This commit is contained in:
parent
28c0991281
commit
1e88c5e463
4 changed files with 18 additions and 0 deletions
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
|
||||
- Added optional `metadata` field to `StreamOptions` for passing provider-specific metadata (e.g. Anthropic `user_id` for abuse tracking/rate limiting) ([#1384](https://github.com/badlogic/pi-mono/pull/1384) by [@7Sageer](https://github.com/7Sageer))
|
||||
|
||||
## [0.52.9] - 2026-02-08
|
||||
|
||||
### Changed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue