Back to paths

Choosing a model and how to serve it

Model choice is three separate decisions (size, openness and serving), each driven by a different requirement. Start with a managed model, self-deploy only for a stated need, and route easy steps to a smaller model.

intermediate~15 min#agentic-ai#google-cloud#models#architecture
Chapter 1FoundationsLesson 3 of 4Show

Prerequisites: What makes something an agent, The Google Cloud agent platform map


Why model choice matters early

The model fixes much of an agent's cost, its latency, where its data is processed and how far you can customise it. It is also hard to change later: prompts, tool descriptions and evaluation thresholds all get tuned to one model's behaviour. So make the choice deliberately, from requirements, not from habit.

The exam frames it as three comparisons: a large or a small model, an open or a proprietary model, and a model you host or one you consume as a service. They are three separate decisions, and the most common mistake is to treat two of them as one.

Three separate decisions

Size. A large model reasons better over long, multi-step problems. A answers faster and costs less per request, but handles a narrower range of tasks well. Within Gemini, the Pro, Flash and Flash-Lite tiers are steps along this axis: the same family and the same API, trading capability for speed and cost.

Openness. A proprietary model, such as Gemini or a partner model like Claude, is used through its provider's service; you never hold the weights. An open-weights model, such as Google's Gemma, publishes its weights, so you may fine-tune it, inspect it and run it on hardware you choose. Tuning alone doesn't force open weights: Gemini models can be tuned through Agent Platform's managed tuning, but you never hold the result. Choose open weights when you need to hold the model yourself, for example to tune it and run it on your own machines.

Serving. With you call a managed endpoint and pay as you go (reserved capacity is an option), with nothing to operate. With a you deploy the weights to an endpoint or cluster you control, such as an Agent Platform endpoint or GKE, and you pay for that compute while it is provisioned, usually whether or not requests arrive. is the catalogue where you find Google, partner and open models and the serving options each one offers.

Choosing between calling an API and running the model on your own GKE cluster is a decision on which axis?

From requirement to choice

Each axis is pushed by different requirements. Read the requirement, find the axis it acts on, then choose.

Predict which option survives the scenario in the question, then tick its three requirements and watch each one pull its axis. Tick two that pull one axis opposite ways to see the conflict.

Simulation: model-requirement-picker

Two rows deserve a closer look:

  • Residency is not the same as control. If data must be processed in the EU, choose a model served from an EU region. Many managed models, Gemini among them, can be called on an EU regional or multi-region endpoint (never the global endpoint, which gives no residency guarantee). An endpoint's location is not always the whole processing boundary: Google documents that a locational endpoint may process data within a wider country or multi-region boundary, and in-country processing in Europe varies by model. So check the model's documented processing commitment for your requirement; where it matches, a managed endpoint meets the need. Self-deploy only when the requirement is stronger: the model must run on infrastructure you operate yourself.
  • Cost at scale is a measurement, not a rule. A self-deployed endpoint costs money every hour it runs. It can beat per-use pricing only when traffic is steady and high enough to keep it busy, so compare the real numbers before moving off a managed model.

So the default is simple: start with a managed model, and move to a self-deployed one only for a stated need, such as a need to run it on infrastructure you operate, holding its weights or a measured cost saving.

A team moves from calling Gemma through a managed endpoint to running the same Gemma model on its own GKE cluster. Which decision changed?

Routing between models in one agent

An agent doesn't need one model for everything. Most of its steps are simple: deciding what kind of request it has, extracting fields, writing a short confirmation. A few are hard: a multi-step diagnosis, a plan with trade-offs. Send the simple steps to a small, fast model and keep the large model for the hard ones. The router is the step that decides which model handles a request. Agent frameworks such as let each agent set its own model, so a design can give the router and the simple steps a small model and the reasoning step a large one.

Routing has a cost of its own: two models to evaluate, and a wrong route sends a hard request to a model that can't handle it. Use it when the volume of simple steps is large enough that the savings matter, and evaluate the router as carefully as the rest of the agent.

Sources

Show 8 sourcesHide sources
SourcePublisherWhat it supports
Professional Agentic Architect exam guide (opens in a new tab)services.google.comGoogle Cloudsection 3.1, the bullet on selecting and configuring the language model; LLM vs SLM, self-hosted vs SaaS, open-source vs proprietary, weighed on cost, security and architecture
Choose a serving option for open models (opens in a new tab)docs.cloud.google.comGoogle Cloud, Agent Platform documentationopen models served as MaaS or self-deployed
Agent Platform documentation, Model Garden and self-deployed models (opens in a new tab)docs.cloud.google.comGoogle Cloud
Data residency (opens in a new tab)docs.cloud.google.comGoogle Cloud, Agent Platform documentationa locational endpoint can process data within a broader country or multi-region boundary; in-country processing varies by model
Generative AI on Agent Platform pricing (opens in a new tab)cloud.google.comGoogle CloudGemma 4 offered as a managed model priced per token; Gemini tuning priced per training token
Serve Gemma open models using GPUs on GKE with vLLM (opens in a new tab)docs.cloud.google.comGoogle Cloud
Gemma documentation (opens in a new tab)ai.google.devGoogle AI for DevelopersGemma, a family of open models
LLM agents (opens in a new tab)github.comGoogle, Agent Development Kit documentationeach LlmAgent sets its own model

Suggested videos

Show 2 videosHide videos

Review

Flashcards1 / 5

What are the three separate decisions in choosing a model?

Check yourself

Quick exam1 / 8 · 0 correct

A team switches its agent from Gemini Pro to Gemini Flash to cut latency. Which decision did it change?

Your notes on this lesson