feat: disable capabilities by model provider#19442
Merged
Conversation
0537b07 to
477ab79
Compare
Collaborator
Author
|
@codex review |
102b53b to
6adebab
Compare
Contributor
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6adebab0d7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Collaborator
Author
|
chatted with Pavel offline, this can't live on config level cuz feature flag will be gone. reworking it so core depends on model-provider for toggling features |
8843ecc to
409335a
Compare
409335a to
7ba8dd5
Compare
dbf3af0 to
40b00fc
Compare
pakrym-oai
reviewed
Apr 28, 2026
pakrym-oai
reviewed
Apr 28, 2026
pakrym-oai
reviewed
Apr 28, 2026
pakrym-oai
reviewed
Apr 28, 2026
pakrym-oai
requested changes
Apr 28, 2026
Collaborator
pakrym-oai
left a comment
There was a problem hiding this comment.
Are we trying to disable more than we need?
807f264 to
0b5e7b4
Compare
2c4e0e0 to
b9931f7
Compare
b9931f7 to
e449752
Compare
pakrym-oai
approved these changes
Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Unsupported features must fail closed and Codex must not expose OpenAI-hosted fallback paths when the active provider cannot support them. In practice, Bedrock should not surface app connectors, MCP servers, tool search/suggestions, image generation, web search, or JS REPL until those paths are explicitly supported for that provider.
This PR moves that decision into provider-owned capability metadata instead of scattering Bedrock-specific checks across callers.
What changed
ProviderCapabilitiestocodex-model-provider, with default support for existing providers and a Bedrock override that disables unsupported launch surfaces.ToolCapabilityBoundstocodex-toolsso provider capability limits can clamp otherwise-enabled tool config.McpManager::mcp_config, which filters configured MCP servers and app connectors based on the active provider.Testing
built locally and verified that bedrock responses api now return without errors calling unsupported tools.