fix: agent file context gating to support document-capable models#35188
fix: agent file context gating to support document-capable models#35188jony376 wants to merge 3 commits intolanggenius:mainfrom
Conversation
|
please check this PR. why merging is blocked? |
|
Thanks for the PR! I reviewed the changes. Here's a summary: What the PR does: Changes the file-gating condition in Enum validity — looks good. Both Tests — look good. Two new unit tests cover the document-model and no-file-feature scenarios [4]. Potential concern — One thing that may be missing: The frontend changes only cover the two debug components ( Overall the change is straightforward, correctly scoped to the reported issue (#35175), and has good test coverage. The main things to verify are:
To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
@dosu |
|
I can't see the exact details in the screenshot (it rendered as raw image data), but based on the repository's merge requirements, the most common reasons a PR would be blocked from merging are:
I'd suggest checking the "Checks" tab on the PR to see which specific checks are failing or pending, and whether any reviews are still required. If it's the PR title, renaming it to something like To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
|
Unfortunately I couldn't clearly read the screenshot, and the PR metadata I can access doesn't include the live merge status or check results. That said, based on the repository's setup, the merge block is most likely due to one of these:
Could you share what the merge blocking message says specifically? That would help narrow it down. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
|
@dosu |
|
I'm not able to approve or trigger GitHub Actions workflows — I don't have permissions to do that. Only repository maintainers with write access can approve workflow runs for first-time contributors from forks. Since this is likely your first PR to the You'll need to wait for a repository maintainer to approve the workflow runs. The PR itself looks solid from my earlier review — once a maintainer sees it and approves the workflows, CI should kick off. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
|
@iamjoel Please check this PR |
|
@laipz8200 Please check this PR |
|
@dosu Why don't review my PR? |
|
I did review your PR earlier in this thread! Here's a quick recap of my findings:
However, I can't approve the PR on GitHub — I don't have merge or approval permissions. You'll need a maintainer like @iamjoel or @laipz8200 (who you've already pinged) to formally review and approve it. Hang tight! To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |


Fixes #35175
Problem
Agent runtime was incorrectly tying file context strictly to vision capability, causing document uploads to be ignored even when the model supported documents. This change aligns file forwarding with actual model file capabilities while preserving existing safeguards for unsupported models.
Summary
This PR fixes a bug where uploaded files were not passed to Agent context unless the selected model had vision support.
Agent file forwarding now correctly works for models that support either vision or document, which resolves the behavior reported in #35175.