Skip to content

feat(agent): vision (multimodal) input + OpenAI max_completion_tokens fix (v0.36.0-beta)#41

Merged
WebTigers merged 1 commit into
mainfrom
feat/agent-vision
Jul 21, 2026
Merged

feat(agent): vision (multimodal) input + OpenAI max_completion_tokens fix (v0.36.0-beta)#41
WebTigers merged 1 commit into
mainfrom
feat/agent-vision

Conversation

@WebTigers

Copy link
Copy Markdown
Owner

What

Adds multimodal (vision) input to the AI provider adapters, plus the OpenAI max_completion_tokens fix.

Vision

  • A user turn may carry images: [{mime, data:<base64>}, …], rendered natively per provider:
    • Anthropicimage content blocks
    • OpenAI-compatible (OpenAI/Grok/Groq/Mistral/DeepSeek/OpenRouter) → image_url content parts
    • GeminiinlineData parts
  • Text-only turns are byte-identical to before — fully backward-compatible.
  • Tiger_Agent_Provider_Factory::supportsVision($provider, $model) reports capability, conservatively (unknown ⇒ false) so callers degrade to a caption/OCR pass rather than erroring against a text-only model.

Fix

  • Tiger_Agent_Provider_OpenAi now sends max_completion_tokens (gpt-5 / o-series reject max_tokens); the base keeps max_tokens via an overridable _maxTokensField().

Consumer

TigerRoundtable uses supportsVision() to decide native image (all seats can see) vs a one-time caption pass (any text-only seat present).

Testing

Verified live on tiger-dev: native image reading (Claude described a generated chart incl. a blue highlight) and the caption fallback (a DeepSeek seat flipped the room to caption mode). Vision heuristic unit-checked across providers. Adapters lint clean on PHP 8.1–8.5.

🤖 Generated with Claude Code

…on_tokens fix (v0.36.0-beta)

Adapters can now carry images on a user turn (images:[{mime,data}]), rendered in each
provider's native format — Anthropic image blocks, OpenAI-compatible image_url parts,
Gemini inlineData. Text-only turns are unchanged (backward-compatible).

Tiger_Agent_Provider_Factory::supportsVision($provider,$model) reports capability,
conservatively (unknown => false) so callers fall back to a caption pass instead of
sending an image to a text-only model.

Also folds in the OpenAI max_completion_tokens fix: OpenAi overrides _maxTokensField()
so gpt-5 / o-series (which reject max_tokens) work.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@WebTigers
WebTigers merged commit 65e9839 into main Jul 21, 2026
5 checks passed
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.

1 participant