Skip to content

fix(providers): preserve explicit vision restrictions - #596

Open
luvs01 wants to merge 1 commit into
devfrom
codex/fix-image-routing-vulnerability
Open

luvs01 wants to merge 1 commit into
devfrom
codex/fix-image-routing-vulnerability

Conversation

@luvs01

@luvs01 luvs01 commented Sep 21, 2026

Copy link
Copy Markdown
Owner

Motivation

  • A startup repair was automatically rewriting saved noVisionModels and modelInputModalities entries that may be intentional operator policy, which could remove fail-closed image stripping and forward raw images upstream.
  • The change aims to preserve operator-authored routing controls while keeping registry corrections as defaults for new or missing values.

Description

  • Removed the unsafe stale-vision startup migration by deleting src/providers/stale-vision-classification-migration.ts and stopped invoking it from src/providers/model-rename-startup.ts, so startup no longer rewrites existing noVisionModels or modelInputModalities values.
  • Kept the registry metadata as the default for new/missing rows and clarified that derive.ts fills missing registry metadata but does not replace saved operator values in src/providers/registry/entries-core.ts.
  • Replaced the migration-oriented test with focused regressions in tests/providers/vision-classification-seed-repair.test.ts that assert explicit text-only policies and noVisionModels restrictions are preserved and continue to require vision preprocessing.
  • Updated documentation in structure/providers-and-adapters.md to explain why startup must not rewrite indistinguishable operator restrictions and how operators can opt into the corrected registry classification.

Testing

  • Ran the focused provider tests with bun test tests/providers/vision-classification-seed-repair.test.ts tests/providers/model-rename-migration.test.ts tests/providers/devin-cli-authmode-migration.test.ts and they passed.
  • Ran layout tooling tests with bun test tests/test-layout.test.ts tests/test-layout-tooling.test.ts and they passed.
  • Ran static gates bun run typecheck, bun run structure:check, and bun run privacy:scan, all of which passed.
  • Attempted a full bun run test; the full suite did not complete within the container run time (attempt stopped) but focused regressions and static checks passed.

Codex Task


Devin Review

@coderabbitai

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository: luvs01/opencodex/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 15fe9f52-b8ba-44ee-908a-c8ed681b5bf0


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 21, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-21T01:54:23.784662Z 7c7b1f5 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown

Deterministic PR hygiene checks passed.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@github-actions github-actions Bot added the bug Something isn't working label Sep 21, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7c7b1f51ac

ℹ️ 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".

rows and missing values. Startup does not rewrite an existing `noVisionModels` entry or
`modelInputModalities` value: those fields are operator-editable request-routing policy, and a
saved registry seed is indistinguishable from an intentional restriction without provenance.
Existing users can opt into the corrected native-vision classification by removing those saved

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Publish the upgrade steps in user docs

After the startup repair is removed, an existing opencode-go row that inherited the old seed continues routing deepseek-v4.1-flash through the vision sidecar until the user removes both saved overrides. This is a user-visible upgrade requirement, but the only new instruction is in this maintainer-facing structure document; add the cleanup steps and the corrected OpenCode Go classification to the relevant English docs-site/ provider or sidecar guide and keep its translations consistent.

AGENTS.md reference: AGENTS.md:L434-L435

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aardvark bug Something isn't working codex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant