Skip to content

[Bug] describe_image function returns placeholder instead of actual API calls #49

Description

@houko

Description: The describe_image function in the media understanding engine is not fully implemented - it returns placeholder text instead of making actual API calls to vision-capable LLM providers.

Location: crates/librefang-runtime/src/media_understanding.rs:29-54

Expected Behavior: The function should call vision-capable LLM APIs (Anthropic, OpenAI, or Gemini) to generate actual image descriptions.

Current Implementation:

// For now, return a structured result indicating the provider.
// Actual API call would go here using reqwest.
Ok(MediaUnderstanding {
    media_type: MediaType::Image,
    description: format!(
        "[Image description would be generated by {} provider]",
        provider
    ),
    provider: provider.to_string(),
    model: default_vision_model(provider).to_string(),
})

Root Cause: The function detects the provider but does not make actual API calls - the implementation is incomplete.

Note: The transcribe_audio function in the same file IS fully implemented and makes actual API calls to Groq/OpenAI.

Suggested Fix: Implement the actual vision API call logic for image description, similar to how transcribe_audio is implemented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions