Skip to main content

ModelCapabilities

@forge/monorepo


@forge/monorepo / backend/src / ModelCapabilities

Type Alias: ModelCapabilities

ModelCapabilities = object

Defined in: backend/src/models/index.ts:46

Properties

nativeSearch

readonly nativeSearch: boolean

Defined in: backend/src/models/index.ts:50


promptCaching?

readonly optional promptCaching?: "automatic" | "explicit" | "none"

Defined in: backend/src/models/index.ts:67

How this model caches a repeated prompt prefix — task #247.

Three values because the providers genuinely differ in a way that changes what this platform must send, not merely what it can expect back:

  • "automatic" — the provider caches a matching prefix on its own, with no directive. OpenAI. Nothing to emit; the only thing that matters is that the prefix is byte-stable.
  • "explicit" — the provider caches only what is marked. Anthropic, via cache_control breakpoints. A platform that emits nothing gets no caching at all here, which is how this was losing the discount.
  • "none" — no prompt caching. Emitting a directive would be an unknown field at best and an error at worst.

Optional, and absent means "none": an existing catalogue entry keeps behaving exactly as it did, and a provider that does cache has to be declared rather than assumed. Assuming the other way would send breakpoints to providers that reject them.


reasoning

readonly reasoning: boolean

Defined in: backend/src/models/index.ts:49


structuredOutput

readonly structuredOutput: boolean

Defined in: backend/src/models/index.ts:48


tools

readonly tools: boolean

Defined in: backend/src/models/index.ts:47