Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

1.9 KB
Raw Blame

paths: - 'products/tasks/backend/model_catalog.py' - 'products/tasks/scripts/model_catalog_projection.py' - 'products/tasks/frontend/modelCatalog.generated.ts' - 'packages/agent/packages/agent-contracts/src/model-catalog.generated.ts'

products/tasks/backend/model_catalog.py is the single definition of a task run's triple: runtime adapter, model, and reasoning effort. The web composer and the desktop app each read a checked-in TypeScript projection of it, and the backend validates runs against the module itself.

After changing the catalog, run hogli build:projections and commit both regenerated files. The command needs no dev stack and takes well under a second, so run it rather than reasoning about whether the output moved.

Never hand-edit products/tasks/frontend/modelCatalog.generated.ts or packages/agent/packages/agent-contracts/src/model-catalog.generated.ts. hogli build:projections --check re-renders both and compares them byte for byte in CI, so an edit that the renderer would not produce fails CI rather than shipping.

Adding a model means one row in MODELS. Two things do not follow from that row and are worth checking:

  • A model gated behind a feature flag carries the flag in its access_flag, which every picker and the server's entitlement check read. The LLM gateway keeps its own copy in MODEL_ACCESS_FLAGS (services/llm-gateway/src/llm_gateway/products/config.py), because it also serves callers outside this repo. Clear both when the rollout reaches everyone: each gate fails closed, so a flag left behind hides the model from anyone the flag service cannot answer for.
  • The catalog names the harness that drives a model. The LLM gateway reports owned_by, which names whoever serves it — cloudflare and baseten for the vendor-served models — so routing a model by its owner puts it on the wrong adapter or drops it entirely.