Skip to main content
A function is the gateway’s term for a task alias — a stable name that stands in for “whatever model currently serves this task.” It exists to break a coupling: normally the model field in a request does double duty, naming both what the caller wants (“summarize this”) and which model answers (“OpenAI’s gpt-4o”). Tie those together and changing the model behind a task means changing application code. A task alias separates the two. Your application calls a stable name; the model behind it is configuration. Swapping gpt-4o for claude-sonnet-4-6 becomes a dashboard change, not a deploy.

How you get this today

In the to11 dashboard, you express task aliases through named routes. When you create a routing rule in AI Gateway → Routing, you give it a routing identifier and your application calls it as route::<name>:
{
  "model": "route::summarize",
  "messages": [
    { "role": "user", "content": "Summarize this document..." }
  ]
}
Behind that name you choose the routing strategy — a single model, a weighted split, a fallback chain, or an A/B experiment. Change the model or strategy behind the route and every caller using route::summarize follows along, with no code change on your side. See Route by a stable name.
The gateway’s lower-level functions — task aliases with advanced per-endpoint variant configurations — are managed by to11 and don’t have a self-serve dashboard surface yet. For the routing customers configure themselves, use named routes and the strategies above.

Next steps

Route by a stable name

Create a named route and swap models without redeploying.

Routes

How routes map a name to a strategy across targets.