Skip to content

API Error: fetch failed #490

@Sebas0317

Description

@Sebas0317

Summary

/init command fails with API Error: fetch failed when using Ollama with qwen2.5-coder:7b, even though the model is correctly configured and working in basic interactions.


Steps to Reproduce

  1. Start Ollama:

    ollama serve
    
  2. Ensure model is installed:

    ollama list
    
  3. Launch OpenClaude with:

    $env:CLAUDE_CODE_USE_OPENAI="1"
    $env:OPENAI_BASE_URL="http://localhost:11434/v1"
    $env:OPENAI_MODEL="qwen2.5-coder:7b"
    openclaude
    
  4. Run:

    /init
    

Expected Behavior

The /init workflow should initialize and execute normally using the configured Ollama model.


Actual Behavior

The command fails with the following error:

API Error: fetch failed

Environment

  • OpenClaude version: v0.1.8
  • OS: Windows
  • Terminal: PowerShell
  • Provider: Ollama (OpenAI-compatible)
  • Model: qwen2.5-coder:7b

Logs / Screenshots


Provider  Ollama
Model     qwen2.5-coder:7b
Endpoint  http://localhost:11434/v1

● local Ready — type /help to begin

❯ /career-ops
⎿ API Error: fetch failed

Additional Context

  • The model works correctly when tested directly with:

    ollama run qwen2.5-coder:7b
    
  • OpenClaude shows the provider as "Ready"

  • Simpler interactions seem to work, but agent-based workflows fail

  • Other models tested:

    • qwen:7b → does not support tools
    • gemma4 variants → not compatible with agent workflows

This may be related to tool calling support, API compatibility, or timeout issues when running multi-step agent flows with Ollama.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions