Skip to content

local model gemma 4 coding development stops "Cannot connect to API: Headers Timeout Error" #441

Closed

Description

@computerworxdev

Tasks
✓ 1. Create HTML structure for solar system
◐ 2. Style with CSS (orbits, planets, animations)
○ 3. Add JavaScript interactivity (click, info display)

Cannot connect to API: Headers Timeout Error

why local ollama llm model gemma 4 on my laptop throws that error and stops to develop

how do i fix the issue and continue?

Nanocoder 1.24.1

Activity

  1. will-lamerton commented on Apr 9, 2026

    @will-lamerton
    Member

    Hey @computerworxdev - can you let me know what model version of Gemma 4 you're using? If you can copy the model code from Ollama that would be a great

    Image
  2. computerworxdev commented on Apr 9, 2026

    @computerworxdev
    Author

    ➜ ~ ollama show gemma4:latest
    Model
    architecture gemma4
    parameters 8.0B
    context length 131072
    embedding length 2560
    quantization Q4_K_M
    requires 0.20.0

    Capabilities
    completion
    vision
    audio
    tools
    thinking

    Parameters
    temperature 1
    top_k 64
    top_p 0.95

    License
    Apache License
    Version 2.0, January 2004
    ...

  3. computerworxdev commented on Apr 9, 2026

    @computerworxdev
    Author

    sorry actually this error was on a different model loaded with nanocoder i will be checking gemma 4 in 1 min since i had issues yesterday

    here is the qween3.5 with above error

    ➜ ~ ollama show qwen3.5:latest
    Model
    architecture qwen35
    parameters 9.7B
    context length 262144
    embedding length 4096
    quantization Q4_K_M
    requires 0.17.1

    Capabilities
    completion
    vision
    tools
    thinking

    Parameters
    presence_penalty 1.5
    temperature 1
    top_k 20
    top_p 0.95

    License
    Apache License
    Version 2.0, January 2004

  4. t0astlabs commented on Apr 10, 2026

    @t0astlabs

    I did not have this problem with gemma4, although I did have it with qwen 3.5. I set:

    "requestTimeout": -1
    "socketTimeout": -1

    in my agents.config.json for the model

    For example:

     {
       "nanocoder": {
         "providers": [
           {
             "name": "my-local-model",
             "baseUrl": "http://localhost:1234/v1",
             "requestTimeout": -1,
             "socketTimeout": -1
           }
         ]
       }
     }

    This fixed the issue for me.

  5. will-lamerton commented on Apr 22, 2026

    @will-lamerton
    Member

    @computerworxdev - can you confirm if this fixes your issue?

    I did not have this problem with gemma4, although I did have it with qwen 3.5. I set:

    "requestTimeout": -1 "socketTimeout": -1

    in my agents.config.json for the model

    For example:

    {
    "nanocoder": {
    "providers": [
    {
    "name": "my-local-model",
    "baseUrl": "http://localhost:1234/v1",
    "requestTimeout": -1,
    "socketTimeout": -1
    }
    ]
    }
    }

    This fixed the issue for me.

  6. LukeShortCloud commented on Apr 25, 2026

    @LukeShortCloud

    Similar to @t0astlabs , I was experiencing this issue with Qwen 3.5 (and Qwen 3.6) and a remote Ollama server. The workaround of disabling those two timeouts also worked for me.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions