-
Notifications
You must be signed in to change notification settings - Fork 0
Provider Capabilities
Sasha Lopashev edited this page Jun 27, 2026
·
1 revision
Migaki should be provider-neutral, not provider-naive.
Different providers expose different execution capabilities. mIR should stay portable while backends use provider-specific capabilities during lowering.
type ProviderCapabilities = {
supportsPromptCaching: boolean
supportsExplicitCacheBreakpoints: boolean
supportsAutomaticCaching: boolean
supportsToolCalling: boolean
supportsRemoteMCP: boolean
supportsStructuredOutputs: boolean
supportsBatching: boolean
supportsReasoningControls: boolean
supportsZeroDataRetention?: boolean
maxContextTokens?: number
cacheTtlOptions?: string[]
}- Version provider capability declarations.
- Include source and observed date when capabilities are based on external docs.
- Allow tests to assert backend behavior against capability fixtures.
- Include assumptions in execution evidence bundles.
- Fail closed when a required provider capability is unavailable.
- mIR should describe logical execution intent.
- Backends should translate logical plans into provider-specific calls.
- Provider-specific optimizations should appear in evidence.
- Provider-specific failures should be represented as execution results, not hidden behind generic errors.
Prompt caching:
- mIR can identify stable context blocks.
- The OpenAI-style backend may use automatic cache behavior.
- The Anthropic-style backend may use explicit cache breakpoints.
- The evidence bundle records which assumption was used.
Structured output:
- mIR can require schema validation.
- A backend with native structured output support can lower directly.
- A backend without native support can use prompt constraints plus post-validation.
- The evidence bundle records the downgrade.
Provider APIs change quickly. A stale capability registry can silently produce bad plans. Capability drift should be treated as a normal maintenance problem, not an edge case.