`createXai().responses` causes request to fail unless my own key is set in BYOK
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 345
- Avg merge
- 13h 31m
- Merged PRs (30d)
- 1
Description
#### Problem
Using `ai@6.0.105` calling `generateText` like below, i receive the error above. Setting a key in the BYOK section of the dashboard fixes this.
#### Error:
```
✘ [ERROR] Uncaught AI_APICallError: No or an invalid authentication header was provided on the request. Please make sure you pass your API key in the corresponding HTTP header. Error
```
#### Code to Reproduce:
```
generateText({
system: composePrompts(systemPrompt),
model: aigateway([createXai().responses("grok-4")]),
})
```
Doing this is necessary for using provider defined tools. I would like to have cloudflares unified system manage the api key and billing instead of having to use my own API keys. Any help with this would be greatly appreciated!
Contributor guide
Assessment
This issue has not been assessed yet.