Skip to content

feat: detect image input support in test-connection endpoint - #496

Merged
mssssss123 merged 1 commit into
OpenBMB:mainfrom
Gucc111:feat/test-connection-image-probe
Aug 19, 2026
Merged

feat: detect image input support in test-connection endpoint#496
mssssss123 merged 1 commit into
OpenBMB:mainfrom
Gucc111:feat/test-connection-image-probe

Conversation

@Gucc111

@Gucc111 Gucc111 commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add image-support detection to POST /api/config/test-connection: after the connectivity test passes, the endpoint determines whether the model accepts image input.
  • Two-tier strategy: first check the built-in provider catalog (covers exact match, aliases, cross-provider lookup, and vendor-prefix stripping for proxy providers like OpenRouter); if no catalog entry is found, send a live probe with a minimal 1x1 PNG to the provider.
  • Response now includes supportsImage (true / false / null) and imageCheckSource ("catalog" or "probe") when connectivity succeeds. Failure responses are unchanged.

Test plan

  • Catalog hit with vision model returns supportsImage: true, imageCheckSource: 'catalog'
  • Catalog hit with text-only model returns supportsImage: false, imageCheckSource: 'catalog'
  • Cross-provider catalog lookup (e.g. OpenRouter → Anthropic) returns correct result
  • Catalog miss + probe success returns supportsImage: true, imageCheckSource: 'probe'
  • Catalog miss + probe 4xx returns supportsImage: false, imageCheckSource: 'probe'
  • Catalog miss + probe timeout returns supportsImage: null, imageCheckSource: 'probe'
  • Connectivity failure does not include supportsImage field
  • All 32 existing + new tests pass

Made with Cursor

@Gucc111
Gucc111 requested a review from mssssss123 August 17, 2026 11:07
@Gucc111
Gucc111 force-pushed the feat/test-connection-image-probe branch from 52f2b15 to bd1894b Compare August 19, 2026 11:12
@mssssss123
mssssss123 merged commit 84d9473 into OpenBMB:main Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants