Clinical AI Kit home Documentation hub / Model Registry

Model Registry

capstone_agent/llm.py is the single place model selection happens. Every agent gets a Gemini built with HttpRetryOptions (exponential backoff) via build_model(tier)never a bare model-id string.

Tiers

Tier Model Used by
flash-lite (default) gemini-3.1-flash-lite Orchestrator routing, validation, audit, simple stages
pro gemini-3.1-pro-preview Reasoning-heavy: SQL generation, answer synthesis, vision analysis
pro-customtools gemini-3.1-pro-preview-customtools Tool-heavy: evidence retrieval, query execution

The README also references a flash-image tier used by the Q&A and DB pipelines for generated visuals (image output).

Rules

Warning: Never bypass the registry

Auth paths (self-controlled live mode)

The public Cloud Run build is deterministic and does not receive model credentials. For a self-controlled live agent deployment, configure one of:

  1. GOOGLE_API_KEY=<key> in .env
  2. Vertex AI via ADC: gcloud auth application-default login + GOOGLE_GENAI_USE_VERTEXAI=TRUE + GOOGLE_CLOUD_PROJECT + GOOGLE_CLOUD_LOCATION=global

Then AGENT_EXECUTION_MODE=live. See Clinical App for how the product server switches modes.

Related: Agent Architecture · Module Reference