Skip to content

Support for Gemini API #49

Closed
Closed

Description

@netgfx

Problem Statement

The system is not able to utilise Gemini API

Proposed Solution

By supporting Gemini API the agent can be utilized locally or via other systems like CI pipelines

Alternatives Considered

No response

Affected Area

Review Agent / LLM interaction

Additional Context

No response

Activity

  1. added
    enhancement
    on Jun 5, 2026
  2. added theissue type on Jun 5, 2026
  3. stay-foolish-forever commented on Jun 5, 2026

    @stay-foolish-forever
    Contributor

    Hi @netgfx, thanks for raising this! We fully agree with the direction — supporting multiple LLM providers is an important goal for this project.

    We're currently designing a more robust and broadly compatible multi-provider model integration solution that will go beyond single-vendor support. This new approach aims to make it easier to plug in different LLM backends (including Gemini and others) in a consistent and well-structured way.

    Related changes are expected to land in the near future. We'll keep you posted on the progress.

  4. roperi commented on Jun 5, 2026

    @roperi

    @stay-foolish-forever

    So which vendors are currently supported? Is it only Anthropic ones? Can you do Qwen ? if so, how do i configure it? thank you.

  5. lizhengfeng101 commented on Jun 7, 2026

    @lizhengfeng101
    Contributor

    Hi @roperi, thanks for the question!

    Currently Supported Protocols

    OCR currently supports two wire protocols:

    1. Anthropic Messages API — for Claude models (default)
    2. OpenAI Chat Completions API — for OpenAI models and any OpenAI-compatible provider

    This means any provider that exposes an OpenAI-compatible /chat/completions endpoint can be used, including DeepSeek, Azure OpenAI, self-hosted models via vLLM/Ollama, etc.

    Using Qwen

    Qwen is not natively integrated, but it can work if you use an OpenAI-compatible endpoint (e.g., Alibaba's DashScope provides an OpenAI-compatible mode).

    Here's how to configure it:

    ocr config set llm.url "https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions"
    ocr config set llm.auth_token "sk-your-dashscope-api-key"
    ocr config set llm.model "qwen-plus"
    ocr config set llm.use_anthropic false

    Or via environment variables:

    export OCR_LLM_URL="https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions"
    export OCR_LLM_TOKEN="sk-your-dashscope-api-key"
    export OCR_LLM_MODEL="qwen-plus"
    export OCR_USE_ANTHROPIC=false

    Note: This relies on the provider's OpenAI protocol compatibility. If you run into any issues, feel free to report them — we'd be happy to help troubleshoot.

    Summary

    Provider How
    Anthropic (Claude) Built-in, default protocol
    OpenAI (GPT) Set use_anthropic = false
    Qwen (DashScope) OpenAI-compatible mode, set use_anthropic = false
    DeepSeek OpenAI-compatible endpoint, set use_anthropic = false
    Any OpenAI-compatible Point llm.url to the endpoint, set use_anthropic = false

    Hope this helps!

  6. westfly commented on Jun 7, 2026

    @westfly
    Image Image
  7. lizhengfeng101 commented on Jun 7, 2026

    @lizhengfeng101
    Contributor

    Image Image

    It looks like everything is working properly. You can change the language preference by setting the language, for example: ocr config set language English. Do you have any other questions?

  8. roperi commented on Jun 7, 2026

    @roperi

    Thank you, @westfly and @lizhengfeng101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions