Repository navigation
Gemini adapter: support wrapFetch / a custom fetch (it is ignored today) #1958
TheOrdinaryWow
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
wrapFetch(#1680) works on the OpenAI, OpenAI-compatible, Anthropic, Mistral, Ollama and OpenRouter adapters, but@tanstack/ai-geminiignores it. The cause is upstream:@google/genaihas nofetchoption (googleapis/js-genai#999, with an implementation in googleapis/js-genai#1215 that has had no review since September).Why it matters to us
We run a server-side support agent behind a provider switch (
openai,openai-compatible,anthropic,gemini). Our fetch wrapper does four things, and Gemini is the only provider that loses all of them:Asks
wrapFetchinto the Gemini client once@google/genaisupports a custom fetch.wrapFetchis set on an adapter that ignores it. Today it does nothing without a sign, which is easy to miss when you have more than one provider.GoogleGenAIclient you built yourself. Users could then pass their own patched client until upstream catches up.Versions:
@tanstack/ai1.0.1,@tanstack/ai-gemini1.0.1 (@google/genai^2.10.0).All reactions