Federation & Service

Model Provider

How Federation registers and manages AI model providers

Model Provider

The Federation AIService abstracts over multiple AI model providers. A model provider is any backend that can serve model requests — OpenAI, Anthropic, Google, or a local inference server.

Registration

Providers register with City by exposing:

  • Available model IDs
  • Capability flags (streaming, tool use, vision, etc.)
  • Authentication requirements

Unified API

Regardless of the backend, the Federation AIService exposes a unified API to Agents. This means:

  • Agents do not need provider-specific code
  • Switching providers is a configuration change, not a code change
  • New providers can be added without modifying Agents

Capability discovery

When an Agent binds to a model ID, City reports:

  • Whether the model supports streaming
  • Whether the model supports tool use
  • Maximum context length
  • Pricing per token

Continue with: