Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fix-grok-provider-options-index-sig.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tanstack/ai-grok": patch
---

Remove `Record<string, unknown>` index signature from `GrokTextProviderOptions` so that `grokSummarize` adapters are assignable to `SummarizeAdapter<string, object>`. Under `strictFunctionTypes`, the index signature caused `object` to be un-assignable to `GrokTextProviderOptions` (contravariant parameter check), making `grokSummarize('grok-4.3')` a type error at every `summarize()` call site. All fields on `GrokTextProviderOptions` are explicitly typed optional members, so the index signature was unnecessary.
3 changes: 1 addition & 2 deletions packages/ai-grok/src/text/text-provider-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ export interface GrokBaseOptions {
* Grok-specific provider options for text/chat
* Based on xAI Responses API options
*/
export interface GrokTextProviderOptions
extends GrokBaseOptions, Record<string, unknown> {
export interface GrokTextProviderOptions extends GrokBaseOptions {
/**
* Temperature for response generation (0-2)
* Higher values make output more random, lower values more focused
Expand Down