• Stefy Lanza (nextime / spora )'s avatar
    text: stop flattening image content to a placeholder (fixes vision over the API) · 361cba6d
    Stefy Lanza (nextime / spora ) authored
    ChatMessage.convert_content_array_to_string ran at parse time (mode=before) and
    unconditionally joined any multipart content list into a string, replacing each
    image_url part with the literal text "[image_url content]". That destroyed the
    image before text.py's vision pipeline (_vision_ok / _normalize_vision_content,
    which the backend's mmproj/MTMDChatHandler consume) ever saw it — so a vision
    model (e.g. lisa = Gemma-4 + mmproj) received only text and answered "no image
    attached", and agents looped retrying. text.py's end-to-end vision handling was
    effectively dead code because content was always pre-stringified.
    
    Now flatten only TEXT-ONLY multipart arrays (the KiloCode case); preserve the
    list whenever it carries an image_url (or any non-text part) so the multimodal
    backend receives the image. Non-vision models still degrade to the placeholder
    downstream (text.py:1439), and text-only/plain-string paths are unchanged.
    Co-Authored-By: 's avatarClaude Opus 4.8 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01RdMufYvtTbtGDWsiZVoXce
    361cba6d
Name
Last commit
Last update
codai Loading commit data...
docs Loading commit data...
packaging Loading commit data...
samples Loading commit data...
tests Loading commit data...
tools Loading commit data...
.dockerignore Loading commit data...
.gitignore Loading commit data...
AI.PROMPT Loading commit data...
CODERAI_API_DOCUMENTATION.md Loading commit data...
CoderAI.gif Loading commit data...
DISTRIBUTION.md Loading commit data...
LICENSE.md Loading commit data...
MULTIMODAL_CAPABILITIES.md Loading commit data...
MULTIMODAL_UI_EXAMPLES.md Loading commit data...
README.md Loading commit data...
build-oci.sh Loading commit data...
build.ps1 Loading commit data...
build.sh Loading commit data...
coderai Loading commit data...
coderai-broker-implementation-reference.md Loading commit data...
coderai-integration.md Loading commit data...
commands Loading commit data...
osxbuild.sh Loading commit data...
package-oci.sh Loading commit data...
package-tarball.sh Loading commit data...
requirements-nvidia.txt Loading commit data...
requirements-vulkan.txt Loading commit data...
requirements.txt Loading commit data...
run-oci.sh Loading commit data...
smoke-test-oci.sh Loading commit data...
todo.md Loading commit data...
video_editor.config.json Loading commit data...