CUSTOM FEDERATION

Use custom models in Vibecape

Connect a Downcity Federation, sign in, and choose the text or image models it provides from AI Model.
01Start a Federation ServerCreate the service and publish models
02Connect and use it in VibecapeSign in, discover, and choose models

01 · Local server

Create and start a Downcity Federation Server

The recommended path is to give the prompt to a Coding Agent. It installs the official skill, generates the local project, and starts the model sources you choose.
01.1

Let a Coding Agent configure it

Copy the prompt into Codex. The agent uses downcity-local-proxy to create ./downcity/local-proxy.

GitHub
downcity-local-proxy
cd ./downcity/local-proxypnpm installpnpm start --codex --claude-codeUse --login for first-time OAuth, for example pnpm start --codex --login
Federation URL
http://127.0.0.1:3000
Models
/v1/ai/models
Chat
/v1/ai/chat/completions

01.2 · How it works

Federation publishes models through one catalog

Federation maps upstream models to stable model IDs and exposes them through AIService. Vibecape reads the catalog and sends requests with the selected model ID.
  1. 1
    Register

    A provider maps a public model ID to an upstream model.

  2. 2
    Discover

    Vibecape calls city.ai.listModels() for the model catalog.

  3. 3
    Invoke

    Federation routes the request to the matching upstream.

models.tssimplified example
import { AIService, Federation } from "@downcity/city";

// provider.model(...) maps a public model id to your upstream model.
const models = [
  provider.model({
    id: "team-codex",
    name: "Team Codex",
    meta: { upstream_model: "gpt-5-codex" },
  }),
];

const federation = new Federation({ db });
federation.use(new AIService().use(models));

// Vibecape now discovers "team-codex" through city.ai.listModels().

02 · Connect and use in Vibecape

Connect the Federation Server and use its models

You only need to configure this once. Switching Federation requires signing in to the new service again.
02.1

Open Account settings

Go to Settings → Account. Select the expand button next to Log in to reveal the Downcity federation URL.

02.2

Enter, test, and save

Enter the Federation URL. Test it with the connection button, then save with the check button. Clear the field to return to the official Federation.

02.3

Sign in to the Federation

Select Log in and choose a method offered by the Federation. Vibecape fetches the models available to that account after sign-in.

02.4

Choose a custom model

Open Settings → AI Model and choose a text or image model. If the Federation changed recently, reload the catalog first.

Troubleshooting

No models after connecting?

Verify the service

Return to Account, expand the URL, and run the connection test.

Sign in again

A login from the previous Federation is not reused after the URL changes.

Reload the catalog

Use Reload in the upper-right corner of AI Model.