client
client copied to clipboard
Set default index of 0 if not defined by API server (e.g. OpenRouter)
What:
- [x] Bug Fix
- [ ] New Feature
Description:
By setting a different baseUri, this package is fully compatible with OpenRouter.ai, a service that supports many different AI models through a common interface (OpenAI's).
However, OpenRouter does not provide an "index" property in its responses, which causes the response to fail. Setting a default index of 0 fixes this problem.