<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/tanstack-openrouter-partnership-jgnyiik4v" -->

---
title: TanStack + OpenRouter Partnership | daily.dev
description: OpenRouter is now an official TanStack sponsor, and the partnership ships a first-class @tanstack/ai-openrouter adapter giving developers access to hundreds of...
canonical: https://daily.dev/posts/tanstack-openrouter-partnership-jgnyiik4v
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: TanStack + OpenRouter Partnership | daily.dev
og:description: OpenRouter is now an official TanStack sponsor, and the partnership ships a first-class @tanstack/ai-openrouter adapter giving developers access to hundreds of...
og:url: https://daily.dev/posts/tanstack-openrouter-partnership-jgnyiik4v
og:image: https://api.daily.dev/og/posts/JgNyIIk4V.png
og:image:alt: TanStack + OpenRouter Partnership
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# TanStack + OpenRouter Partnership

**[TanStack](https://daily.dev/sources/tanstack-blog)** · 2 min read · 0 upvotes · 1 comments

## Summary

OpenRouter is now an official TanStack sponsor, and the partnership ships a first-class @tanstack/ai-openrouter adapter giving developers access to hundreds of AI models (GPT, Claude, Gemini, Llama, Mistral, DeepSeek) through one API key. Switching models means changing a string rather than rewriting integration code, and an auto-router with configurable fallbacks provides production resilience without custom retry logic. A demo by Jack Herrington shows the adapter used for image generation beyond just chat.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://tanstack.com/blog/openrouter-partnership>

## Questions this post answers

### How do I use OpenRouter with TanStack AI to access multiple LLM providers through one integration?

Install the @tanstack/ai-openrouter package and use the openRouterText adapter with a model string like 'anthropic/claude-sonnet-4.5' passed to the chat function from @tanstack/ai. Switching models only requires changing the string, since one API key covers GPT, Claude, Gemini, Llama, Mistral, DeepSeek, and other models in the OpenRouter catalog.

_daily.dev helps developers track new adapters like this as they ship across the TanStack ecosystem._

### How do I set up automatic model fallbacks with OpenRouter so my app stays resilient if a provider goes down?

Use the 'openrouter/auto' adapter with a modelOptions.models array listing fallback models in priority order, for example gpt-5.5, claude-sonnet-4.5, and gemini-3.1-pro-preview. OpenRouter automatically falls through the list if the primary model is unavailable, so the fallback order lives in the request instead of custom retry code.

_Developers building resilient AI features can follow model routing patterns like this on daily.dev._

## Community discussion

Top comments from developers on daily.dev.

**@dmytriis** · 0 upvotes

> Fallback is trivial only before the first observable side effect.
>
> Once a model has streamed output or emitted a tool call, “try the next model” can duplicate tools or fork the conversation.
>
> Transport failover is solved. Agent failover needs a commit boundary.

## Similar posts on daily.dev

- [TanStack Releases Framework Agnostic AI Toolkit](https://daily.dev/posts/tanstack-releases-framework-agnostic-ai-toolkit-j747yitl6) · InfoQ · 1 upvotes · 0 comments
- [OpenRouter: One API Key to Rule Them All](https://daily.dev/posts/openrouter-one-api-key-to-rule-them-all-ektckqyxv) · Playful Programming · 0 upvotes · 0 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript), [#architecture](https://daily.dev/tags/architecture), [#tanstack](https://daily.dev/tags/tanstack), [#openrouter](https://daily.dev/tags/openrouter)

[View this post on daily.dev](https://daily.dev/posts/tanstack-openrouter-partnership-jgnyiik4v)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"TanStack + OpenRouter Partnership","url":"https://daily.dev/posts/tanstack-openrouter-partnership-jgnyiik4v","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/tanstack-openrouter-partnership-jgnyiik4v"},"datePublished":"2026-08-23T12:22:26.569Z","dateModified":"2026-09-14T08:21:41.032Z","description":"OpenRouter is now an official TanStack sponsor, and the partnership ships a first-class @tanstack/ai-openrouter adapter giving developers access to hundreds of...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/4631dce79d4ed263f62dc71a4ff0fcda?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/4631dce79d4ed263f62dc71a4ff0fcda?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"TanStack","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"TanStack","logo":"https://media.daily.dev/image/upload/s--TVIrvIT7--/f_auto,q_auto/v1787487634/logos/tanstack-blog?_a=BAMAMicg0","url":"https://daily.dev/sources/tanstack-blog"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/tanstack-openrouter-partnership-jgnyiik4v","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"javascript,architecture,tanstack,openrouter","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"TanStack","item":"https://daily.dev/sources/tanstack-blog"},{"@type":"ListItem","position":3,"name":"TanStack + OpenRouter Partnership"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/tanstack-openrouter-partnership-jgnyiik4v","comment":[{"@type":"Comment","text":"Fallback is trivial only before the first observable side effect.\nOnce a model has streamed output or emitted a tool call, “try the next model” can duplicate tools or fork the conversation.\nTransport failover is solved. Agent failover needs a commit boundary.","datePublished":"2026-08-31T18:14:50.155Z","url":"https://daily.dev/posts/JgNyIIk4V#c-qNOSzIpOs","author":{"@type":"Person","name":"Dmytrii S.","url":"https://daily.dev/dmytriis","image":"https://avatars.githubusercontent.com/u/946519?v=4"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/tanstack-openrouter-partnership-jgnyiik4v#faq","mainEntity":[{"@type":"Question","name":"How do I use OpenRouter with TanStack AI to access multiple LLM providers through one integration?","acceptedAnswer":{"@type":"Answer","text":"Install the @tanstack/ai-openrouter package and use the openRouterText adapter with a model string like 'anthropic/claude-sonnet-4.5' passed to the chat function from @tanstack/ai. Switching models only requires changing the string, since one API key covers GPT, Claude, Gemini, Llama, Mistral, DeepSeek, and other models in the OpenRouter catalog. daily.dev helps developers track new adapters like this as they ship across the TanStack ecosystem."}},{"@type":"Question","name":"How do I set up automatic model fallbacks with OpenRouter so my app stays resilient if a provider goes down?","acceptedAnswer":{"@type":"Answer","text":"Use the 'openrouter/auto' adapter with a modelOptions.models array listing fallback models in priority order, for example gpt-5.5, claude-sonnet-4.5, and gemini-3.1-pro-preview. OpenRouter automatically falls through the list if the primary model is unavailable, so the fallback order lives in the request instead of custom retry code. Developers building resilient AI features can follow model routing patterns like this on daily.dev."}}]}
```

