Summary
Routing Codex to an Amazon Bedrock Model Provider Service through the Databricks AI Gateway does not work. The gateway serves the amazon_bedrock provider type only over Bedrock's native Converse API. Codex speaks the OpenAI Responses API, which the gateway rejects for Bedrock, so ucode codex --provider <bedrock-mps> cannot reach the provider and Codex falls back to its own picker (system-hosted OpenAI models).
Evidence
Tested against an amazon_bedrock MPS with the Databricks-Model-Provider-Service header set:
POST /ai-gateway/codex/v1/responses → INVALID_PARAMETER_VALUE: Native_api_type=openai/v1/responses is not supported for provider Amazon Bedrock.
POST /ai-gateway/mlflow/v1/chat/completions → Native_api_type=mlflow/v1/chat/completions is not supported for provider Amazon Bedrock.
POST /ai-gateway/model/{modelId}/converse and /converse-stream → work, returning real Bedrock output.
Declaring native_api_types on the MPS targets (for example openai/v1/responses) does not change this. The runtime still refuses non-Converse dialects for the amazon_bedrock provider, so that field is catalog metadata rather than a runtime switch.
Impact
- Codex cannot use Amazon Bedrock through the gateway today.
- Pi and OpenCode are unaffected because they speak Converse. Pi support is in the follow-up PR.
Next steps
- This is blocked on the gateway adding OpenAI Responses (or Chat) translation for the
amazon_bedrock provider.
- Until that lands, ucode should not present Bedrock as a Codex provider, or should surface a clear "not supported" message instead of silently falling back.
Summary
Routing Codex to an Amazon Bedrock Model Provider Service through the Databricks AI Gateway does not work. The gateway serves the
amazon_bedrockprovider type only over Bedrock's native Converse API. Codex speaks the OpenAI Responses API, which the gateway rejects for Bedrock, soucode codex --provider <bedrock-mps>cannot reach the provider and Codex falls back to its own picker (system-hosted OpenAI models).Evidence
Tested against an
amazon_bedrockMPS with theDatabricks-Model-Provider-Serviceheader set:POST /ai-gateway/codex/v1/responses→INVALID_PARAMETER_VALUE: Native_api_type=openai/v1/responses is not supported for provider Amazon Bedrock.POST /ai-gateway/mlflow/v1/chat/completions→Native_api_type=mlflow/v1/chat/completions is not supported for provider Amazon Bedrock.POST /ai-gateway/model/{modelId}/converseand/converse-stream→ work, returning real Bedrock output.Declaring
native_api_typeson the MPS targets (for exampleopenai/v1/responses) does not change this. The runtime still refuses non-Converse dialects for theamazon_bedrockprovider, so that field is catalog metadata rather than a runtime switch.Impact
Next steps
amazon_bedrockprovider.