Skip to content

fix: prevent unsupported CN image input from breaking sessions - #121

Merged
CatStack-pixe merged 2 commits into
mainfrom
fix/cn-image-input-guard
Sep 6, 2026
Merged

fix: prevent unsupported CN image input from breaking sessions#121
CatStack-pixe merged 2 commits into
mainfrom
fix/cn-image-input-guard

Conversation

@CatStack-pixe

Copy link
Copy Markdown
Owner

Summary

  • sanitize image parts for text-only DeepSeek/Zhipu models at the gateway boundary
  • keep explicit vision models and non-CN providers unchanged
  • cover HTTP and regular Codex WebSocket ingress with service tests

Verification

  • git diff --check passed
  • Go toolchain unavailable locally; GitHub Actions should run gofmt/tests

@CatStack-pixe CatStack-pixe added the bug Something is not working label Sep 6, 2026
@CatStack-pixe
CatStack-pixe force-pushed the fix/cn-image-input-guard branch from 2ea5407 to 8ee60cf Compare September 6, 2026 07:20

@CatStack-pixe CatStack-pixe left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Code audit: reviewed the five-file diff after CI. Image sanitization is limited to DeepSeek/Zhipu group platforms and text-only model names, preserves explicit vision models, recursively covers input and messages, and does not reuse image-generation permissions. HTTP mapping occurs before sanitization and the regular Codex WS ingress applies the same policy. CI passed for unit tests, integration tests, lint, security, frontend, and shell checks. No blocking findings.

@CatStack-pixe
CatStack-pixe merged commit 39d0ab9 into main Sep 6, 2026
16 checks passed
@CatStack-pixe
CatStack-pixe deleted the fix/cn-image-input-guard branch September 6, 2026 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something is not working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant