Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.clearmaas.com/llms.txt

Use this file to discover all available pages before exploring further.

ClearMaas adds a small number of headers to every API response so you can inspect how your request was routed. They tell you which model served the call (in the same provider-prefixed format you’d pass as model); they don’t expose internal routing details like channel identifiers or upstream backend URLs.
HeaderPresent whenExampleMeaning
X-Clear-Fallback-Levelextra_body.models caused a fallback1Zero-indexed position in your fallback chain that served the response. 0 means the primary model succeeded and fallback did not trigger.
X-Clear-Fallback-ModelFallback triggered (level > 0)google/gemini-2.5-proThe model that actually served the response after the primary failed.
X-Clear-RouterYou called clearmaas/{name}autoThe name of the router you invoked.
X-Clear-Resolved-ModelYou called clearmaas/{name}openai/gpt-4o-miniThe concrete model the router resolved to at request time.
Retry-AfterResponse is 429 Too Many Requests5How many seconds to wait before retrying.

Reading them in code

response = client.chat.completions.with_raw_response.create(
  model="clearmaas/auto",
  messages=[...],
)
print(response.headers.get("X-Clear-Resolved-Model"))

What ClearMaas does not expose

We deliberately do not add:
  • A provider or routed_to header or response field
  • Any internal routing identifier or upstream backend URL
  • Any header that tells a caller which upstream served the request
ClearMaas is a single provider from your application’s point of view. Internal routing is our concern, not your dependency.