Skip to content

vision: add MessagePart::Image and supports_vision to LlmProvider trait #491

@bug-ops

Description

@bug-ops

Parent: #490

Scope

Foundation layer — extend the content model and provider trait for image support.

Changes

  1. crates/zeph-llm/src/provider.rs

    • Add MessagePart::Image { data: Vec<u8>, mime_type: String } variant to the enum
    • Add fn supports_vision(&self) -> bool with default false to LlmProvider trait
    • Update flatten_parts() to skip image parts (text-only fallback)
  2. crates/zeph-core/src/channel.rs

    • Add ImageData { data: Vec<u8>, mime_type: String, filename: Option<String> } struct
    • Add images: Vec<ImageData> field to ChannelMessage
  3. Agent loop (crates/zeph-core/src/agent.rs or equivalent)

    • Convert ChannelMessage.images into MessagePart::Image when building LLM messages

Notes

  • No provider implementations yet — just the trait and data model
  • This unblocks all downstream issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestllmLLM provider related

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions