Skip to content

Bridge Compatibility Planning

Not every upstream provider supports every feature of the OpenAI Responses API. GodeX must decide, before any request is sent, which features are natively supported, which can be degraded to a close alternative, which must be silently ignored, and which are hard blockers. The compatibility subsystem makes these decisions deterministically and records diagnostics for every choice, giving operators full visibility into why a particular request was shaped the way it was.

At a Glance

ConceptTypePurpose
ProviderCapabilitiesInterfaceDeclares what a provider supports (parameters, tools, formats, reasoning)
CompatibilityPlanInterfaceHolds all decisions for a single request
CompatibilityDecisionInterfaceOne decision: action, reason, effectiveValue
CompatibilityDiagnosticInterfaceObservable record: code, severity, path, message, metadata
planBridgeCompatibilityFunctionEntry point; evaluates parameters and response formats
planToolsFunctionEvaluates tool declarations and tool_choice
planOutputContractFunctionEvaluates JSON schema output constraints

Decision Actions

Every compatibility decision resolves to exactly one of four actions:

ActionMeaningDiagnostic Severity
supportedFeature is natively supported; forwarded as-is-- (no diagnostic emitted)
degradedFeature mapped to a close alternative; behavior may differwarn
ignoredFeature is silently dropped; request proceeds without itwarn
rejectedFeature is a hard blocker; request is aborted with a BridgeErrorerror

Capability Domains

A provider declares its capabilities through the ProviderCapabilities interface:

DomainFieldTypeExample
Parametersparameters.supportedSet<string>stream, temperature, top_p, max_output_tokens, reasoning, safety_identifier, user
Toolstools.supportedSet<string>function, mcp, shell, apply_patch, custom
Tool Degradationtools.degradedMap<string, string>mcp -> function
Tool ChoicetoolChoice.supportedSet<string>auto, required, function
Response FormatsresponseFormats.supportedSet<string>text, json_object, json_schema
Reasoningreasoning.effort"none" / "boolean" / "native"Whether and how reasoning effort is forwarded
Streamingstreaming.usagebooleanWhether SSE stream includes usage data

Compatibility Planning Flow

Tool Compatibility

The planTools function evaluates each tool declaration against the provider's ToolPlanningProfile:

Tool Choice Resolution

RequestedProvider SupportsResult
autoautosupported
requiredrequiredsupported
requiredauto onlydegraded to auto
requiredneitherrejected (error)
Named function/custommatching declaration + provider typesupported or degraded
Named function/customno matching declarationrejected (error)

Response Format Degradation

When a provider does not natively support json_schema but does support json_object, the output contract is degraded. A synthetic instruction is injected into the system messages that includes the original JSON Schema, validation rules, and a note that GodeX will validate the output:

DegradationProvider response_formatSynthetic InstructionPost-Validation
json_schema to json_object{ type: "json_object" }Schema name, description, and full JSON SchemarequiresValidJson: true when strict

Reasoning Effort Modes

Providers handle reasoning effort differently. The reasoning.effort capability determines the mapping:

Capability ModeBehavior
nativeForward reasoning_effort directly (e.g., low, medium, high)
booleanMap to thinking.type: "none" becomes "disabled", all others become "enabled"
noneReasoning effort is silently ignored; no parameter forwarded

Diagnostic Codes

Every non-supported decision produces a diagnostic with a machine-readable code:

CodeTrigger
bridge.param.ignoredGodeX-owned parameter (metadata, conversation, background) or unsupported tool type
bridge.param.degradedFeature downgraded (json_schema to json_object, tool_choice required to auto)
bridge.param.unsupportedHard rejection of unsupported feature
bridge.tool.compatibilityTool declaration not natively supported (action varies per decision)

CompatibilityPlan Structure

Cross-References

References