Problem
ucode codex --provider <bedrock-mps> fails with:
ERROR Model provider service '<name>' is a 'amazon_bedrock' provider, which codex can't route to (supported: openai).
This happens even when the Bedrock MPS exposes OpenAI-compatible models, because _TOOL_PROVIDER_TYPES hardcodes codex to only ("openai",), and a secondary check in resolve_provider_service rejects any Bedrock service that doesn't declare Claude model targets.
Root cause
Two places in src/ucode/databricks.py prevent this from working:
_TOOL_PROVIDER_TYPES (~line 2097) — "codex": ("openai",) never matches amazon_bedrock.
- Bedrock-Claude-targets guard in
resolve_provider_service and service_usable_for_tool — rejects any Bedrock MPS without Claude targets, regardless of which tool is asking.
Codex uses the OpenAI-compatible endpoint. Bedrock exposes this same endpoint for non-Claude models (e.g. Titan, GPT-class models hosted on Bedrock). There's no reason to require Claude targets when codex is the active tool.
Fix
- Add
"amazon_bedrock" to codex's allowed types in _TOOL_PROVIDER_TYPES.
- Gate the "exposes no Claude models" check on
tool == "claude" in both resolve_provider_service and service_usable_for_tool.
PR forthcoming.
Problem
ucode codex --provider <bedrock-mps>fails with:This happens even when the Bedrock MPS exposes OpenAI-compatible models, because
_TOOL_PROVIDER_TYPEShardcodes codex to only("openai",), and a secondary check inresolve_provider_servicerejects any Bedrock service that doesn't declare Claude model targets.Root cause
Two places in
src/ucode/databricks.pyprevent this from working:_TOOL_PROVIDER_TYPES(~line 2097) —"codex": ("openai",)never matchesamazon_bedrock.resolve_provider_serviceandservice_usable_for_tool— rejects any Bedrock MPS without Claude targets, regardless of which tool is asking.Codex uses the OpenAI-compatible endpoint. Bedrock exposes this same endpoint for non-Claude models (e.g. Titan, GPT-class models hosted on Bedrock). There's no reason to require Claude targets when codex is the active tool.
Fix
"amazon_bedrock"to codex's allowed types in_TOOL_PROVIDER_TYPES.tool == "claude"in bothresolve_provider_serviceandservice_usable_for_tool.PR forthcoming.