Back to Maison Apéro

Engineering transparency

Technology stack & AI architecture

A public, versioned view of how Maison Apéro balances wine expertise, speed, cost and privacy. Production components are clearly separated from architecture still under validation.

LivePartially liveIn validationPlanned

This page is generated from one catalog. A component is marked live only after production validation.

AI technology stack

The client never selects a provider. The server owns task classification, model policy, billing and fallback.

LayerTechnology or modelPurposeStatus
ClientFlutter 3.47 / Dart 3.13One UI foundation for Android, iOS, Web and PWA.Live
Authentication and API protectionFirebase Auth / App CheckAccept authenticated users and requests from verified app instances.Live
Evaluation orchestratorCloud Functions / Node.js 22Classify tasks, select models, control tickets, retry safely and validate output.Partially live
Verified cache deliveryServer-owned 8-language templatesReturn a verified Wine Library result without running a new model request.Partially live
Input normalizationministral-8b-2512256k context · structured outputsNormalize wine identity and determine whether an image, list excerpt or typed description is sufficient.In validation
Review drafting validationmistral-small-2603256k context · structured outputs · tunable reasoningValidate review-drafting and study-question metadata paths before any production activation.In validation
Lightweight Geminigemini-3.5-flash-lite1M input context · structured outputs · thinkingPlanned translation, label extraction and lightweight structured processing.Planned
High-precision Geminigemini-3.7-flash1M input context · structured outputs · low / medium / high thinkingStructured tasting evaluation, question generation, written scoring, Grand analysis and critical adjudication.Live
DataFirestore / Wine LibraryVerified wine facts, reviews and locale-specific cached projections.Live
Confidential knowledgeServer-only reference layerKeep advanced references and assessment instructions on the server.Partially live
SecretsGoogle Secret ManagerKeep provider credentials outside source code and client builds.Live
ObservabilityCloud Logging / aggregate metricsMeasure model, task, latency, token use and success rate without logging review drafting bodies.Live

How an AI request is processed

A cost-aware cascade uses the least complex path that can satisfy the task, then validates the result before release.

01Label, wine-list excerpt or typed identity
02Auth + App Check
03Server-owned review or study contract
04Verified Wine Library match → cached result · 0 tickets
05Identity normalization → validation path
06Review drafting candidate → Mistral Small 4 · validation only
07Translation or extraction → Gemini 3.5 Flash-Lite
08Structured review, question generation or scoring → Gemini 3.7 Flash
09Schema, facts, language, plan projection and policy checks
10Reference result or automatic refund

Why this architecture

The design follows four engineering principles rather than treating every evaluation and study task as the same model request.

01

Frugal computation

Deterministic code handles predictable interactions. Smaller models handle ambiguity, while higher-precision inference is reserved for work where an error costs more than tokens.

02

Grounded generation

Verified Wine Library data is retrieved before generation where available. Facts and recommendations are separated so missing evidence is not disguised as certainty.

03

Fail closed on critical work

A failed high-precision assessment is not silently downgraded to a weaker model. The user receives a retry and the ticket is restored.

04

Idempotent billing

One task has one server-issued request key. Retry and provider fallback cannot create a second charge.

Reasoning policy

Reasoning intensity is assigned by task risk. The public labels describe policy; private prompts, exact thresholds and reasoning traces remain server-only.

TaskModelIntensity
Wine identity normalizationMinistral 3 8BMinimal
Review-drafting validationMistral Small 4Low
Study-question generationMistral Small 4Medium
Translation and extractionGemini 3.5 Flash-LiteMinimal
Structured tasting and written scoringGemini 3.7 FlashMedium
Material-difference adjudicationGemini 3.7 FlashHigh

Ticket integrity

Tickets follow the purpose of the task, not the provider selected behind the scenes.

  • Wine Library lookup and a verified cached result use 0 tickets.
  • Invalid or insufficient input is rejected before consumption.
  • Wine reviews use 0 tickets.
  • Study sets use the fixed price shown before the user confirms the start.
  • Fallback and automatic retry never consume an additional ticket.
  • No usable response means an automatic refund.
  • Resuming an already-paid task does not charge again.

Fallback without silent quality loss

  • Production structured reviews and question generation remain on the approved Gemini 3.7 Flash path.
  • Planned translation and extraction use a bounded Gemini 3.5 Flash-Lite retry after validation.
  • Structured tasting and Grand: Gemini 3.7 Flash failure never falls down to a weaker assessment model.
  • Model changes remain invisible to billing: one task, at most one charge.

Confidentiality and privacy boundary

  • The public catalog identifies approved technologies, but the client cannot choose or override a runtime model.
  • Assessment instructions, private references, routing thresholds and safeguards remain server-only.
  • Reasoning traces are never displayed to users or written to Firestore or application logs.
  • Provider keys remain in Secret Manager and never enter the app, PWA or public repository.
  • Grand reference material remains on the approved Gemini path while Mistral validation is in progress.
  • Production approval for Mistral requires the EU regional stateless API, API training exclusion and verified ZDR eligibility; these controls are not presented as active before operational verification.
  • Operational logs contain metadata such as task class, latency, token totals and error category—not prompts, messages, email addresses or images.

A living architecture

The model catalog, eight localized pages, structured data, sitemap and AI-readable summary are generated together. A release test rejects missing locales, false live-status claims and drift from pinned runtime versions.

Primary technical references

Architecture questions

Does the mobile or web client choose the AI model?

No. The authenticated server classifies the task and applies a versioned model policy.

Will fallback consume another ticket?

No. Retry and provider fallback share the same idempotent request and cannot create a second charge.

Are Mistral models already serving production reviews?

No. They remain under multilingual wine-domain validation and are shown as in validation until production release checks pass.

Are Maison Apéro's assessment instructions public?

No. Public documentation explains the architecture, while prompts, private references, thresholds and reasoning traces remain confidential on the server.