-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
The documentation overview shows calling client.chat.send with it accepting an object: with types below:
model: string,
messages: [{
role: string,
content: string
}],
stream?: boolean
]
However, the SDK types require these to be nested under chatGenerationParams. This causes a TypeScript error when following the docs.
Steps to Reproduce
- Install
@openrouter/sdk@0.9.11 - Use the docs-style call:
client.chat.send({ model, messages, stream })
- Observe TypeScript error:
Object literal may only specify known properties, and 'model' does not exist in type 'SendChatCompletionRequestRequest'
Expected Behavior
The docs example should either wrap model/messages/stream under chatGenerationParams, or the SDK typings should be updated to accept top‑level model/messages/stream.
Actual Behavior
The SDK currently requires:
client.chat.send({ chatGenerationParams: { model, messages, stream } })
Environment
- OS: WSL with Ubuntu
- Runtime: Bun
- Package:
@openrouter/sdk@0.9.11 - TypeScript: ^5
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels