Skip to content

Local ollama throws "Error: Failed to parse execute_command args: missing field 'command' at line" for qa runs #32

@thalaz

Description

@thalaz

I am trying to run the qa command by using ollama 3.1.

When running a "qa", I'm constantly getting an error. Here is the output:

work@work-mac ~ % ollama list
NAME           ID              SIZE      MODIFIED
llama3.1:8b    46e0c10c039e    4.9 GB    12 minutes ago
work@work-mac ~ % pwd
/Users/work
work@work-mac ~ % cd Desktop
work@work-mac Desktop % qa -d "list all files here"
[debug] Using provider='ollama' base_url='http://127.0.0.1:11434/v1' model='llama3.1:8b'
[debug] Inferred shell: POSIX sh
[debug] POST http://127.0.0.1:11434/v1/chat/completions (1806 bytes)
Error: Failed to parse execute_command args: missing field `command` at line 1 column 72

But, everything works with qq:

work@work-mac Desktop % qq -d "list all files here"
[debug] Using provider='ollama' base_url='http://127.0.0.1:11434/v1' model='llama3.1:8b'
[debug] Inferred shell: POSIX sh

[debug] POST http://127.0.0.1:11434/v1/chat/completions (3205 bytes, stream)
Listing Files

ls

This will list all files in the current directory.

You can also use ls -l
 to get a detailed listing with file permissions, ownership, and timestamps.

If you want to see hidden files as well, use ls -a
.

Here is my config:

{
  "default_profile": "ollama",
  "model_providers": {
    "openai": {
      "name": "OpenAI",
      "base_url": "https://api.openai.com/v1",
      "env_key": "OPENAI_API_KEY",
      "api_key": null,
      "local": false,
      "mode": "http"
    },
    "anthropic": {
      "name": "Anthropic",
      "base_url": "https://api.anthropic.com/v1",
      "env_key": "ANTHROPIC_API_KEY",
      "api_key": null,
      "local": false,
      "mode": "http"
    },
    "openrouter": {
      "name": "OpenRouter",
      "base_url": "https://openrouter.ai/api/v1",
      "env_key": "OPENROUTER_API_KEY",
      "api_key": null,
      "local": false,
      "mode": "http"
    },
    "claude_cli": {
      "name": "Claude Code CLI",
      "base_url": "cli://claude",
      "env_key": "CLAUDE_CLI_API_KEY",
      "api_key": null,
      "local": true,
      "mode": "cli",
      "cli": {
        "engine": "claude",
        "binary": "claude"
      }
    },
    "codex": {
      "name": "Codex CLI",
      "base_url": "cli://codex",
      "env_key": "CODEX_CLI_API_KEY",
      "api_key": null,
      "local": true,
      "mode": "cli",
      "cli": {
        "engine": "codex",
        "binary": "codex",
        "base_args": [
          "exec"
        ]
      }
    },
    "ollama": {
      "name": "Ollama",
      "base_url": "http://127.0.0.1:11434/v1",
      "env_key": "OLLAMA_API_KEY",
      "api_key": "local",
      "local": true,
      "mode": "http"
    },
    "groq": {
      "name": "Groq",
      "base_url": "https://api.groq.com/openai/v1",
      "env_key": "GROQ_API_KEY",
      "api_key": null,
      "local": false,
      "mode": "http"
    }
  },
  "profiles": {
    "openai": {
      "model_provider": "openai",
      "model": "gpt-5-mini"
    },
    "anthropic": {
      "model_provider": "anthropic",
      "model": "claude-3-5-sonnet-20241022"
    },
    "claude_cli": {
      "model_provider": "claude_cli",
      "model": "sonnet"
    },
    "openrouter": {
      "model_provider": "openrouter",
      "model": "openai/gpt-4.1-nano"
    },
    "groq": {
      "model_provider": "groq",
      "model": "openai/gpt-oss-20b"
    },
    "ollama": {
      "model_provider": "ollama",
      "model": "llama3.1:8b"
    },
    "codex": {
      "model_provider": "codex",
      "model": "gpt-5",
      "reasoning_effort": "minimal"
    }
  },
  "include_history": false,
  "copy_first_command": false
}

I needed to change the model to "model": "llama3.1:8b" because otherwise I was getting this error:

work@work-mac Desktop % qa -d "list all files here"
[debug] Using provider='ollama' base_url='http://127.0.0.1:11434/v1' model='llama3.1'
[debug] Inferred shell: POSIX sh
[debug] POST http://127.0.0.1:11434/v1/chat/completions (1803 bytes)
Error: API error (404 Not Found): {"error":{"message":"model 'llama3.1' not found","type":"api_error","param":null,"code":null}}

work@work-mac Desktop % qq -d "list all files here"
[debug] Using provider='ollama' base_url='http://127.0.0.1:11434/v1' model='llama3.1'
[debug] Inferred shell: POSIX sh

[debug] POST http://127.0.0.1:11434/v1/chat/completions (3202 bytes, stream)
Error: API error (404 Not Found): {"error":{"message":"model 'llama3.1' not found","type":"api_error","param":null,"code":null}}

Environment:

  • MacBook Pro Apple M1 Pro
  • MacOS Tahoe 26.1
  • qq 0.10.0
  • ollama version is 0.12.10

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions