Skip to content
Dessot

Case study

One router for Gemini and OpenAI, with fallback and cost metering

All AI calls in GoGinnie go through one router that can switch between Google Gemini and OpenAI automatically and records token use and latency for each feature.

Dessot productTravel and consumer AI

GoGinnie, a Dessot product

Share
GoGinnie website home page: “Know what to do right now, wherever you are.”
GoGinnie mobile home screen

Context

Where this started.

Context

GoGinnie uses language models in several features: recommendations, the assistant, the trip planner and the feed.

Problem

Depending on one AI provider makes an app fragile, and without measurement nobody knows which feature is spending the money.

Approach

What was done.

Features

  • Recommendations
  • Ask Ginnie
  • Trip planner
  • Feed titles

Router

  • call_ai: One entry point

Providers

  • OpenAI: Default provider
  • Google Gemini: Or by preference

Records

  • Usage records: Kept 90 days

Connections

  • Recommendations → call_ai: Prompt and feature name
  • Ask Ginnie → call_ai: Prompt and feature name
  • Trip planner → call_ai: Prompt and feature name
  • Feed titles → call_ai: Prompt and feature name
  • call_ai → OpenAI: Preferred, or retry after Gemini fails
  • call_ai → Google Gemini: Preferred, or retry after OpenAI fails
  • OpenAI → Usage records: Tokens and latency
  • Google Gemini → Usage records: Tokens and latency
Every AI call takes the same path: one router picks the provider, retries once with the other on failure, and records what the call cost.
  1. 01

    A single entry point

    Features call one function, not a provider. It uses the user’s preferred provider: OpenAI by default, or Google Gemini.

  2. 02

    Automatic fallback

    If the preferred provider’s request fails, it retries once with the other provider. The user’s preference is never changed.

  3. 03

    Metering per feature

    Every successful call records the feature, provider, model, tokens and latency, kept for 90 days, so cost and speed can be tracked and tuned.

Outcome

The result, in plain terms.

In production in the live web app. Cost figures are not published.

providers behind one router
2

For you

What a similar client would get.

  • One place in your code through which every AI call goes.
  • A second provider ready, so one provider failing does not stop your product.
  • AI cost and speed measured per feature, from the first release.

Facing a similar problem?

Tell us what you are working on. A person from Dessot will reply.