Skip to content

[Feature]: openai client cannot get the right model info from local Ollama service #14189

@syser9

Description

@syser9

Problem or Use Case

2026-04-22 23:06:20,636 INFO agent.auxiliary_client: Vision auto-detect: using main provider custom (qwen3-coder:latest) 2026-04-22 23:06:20,804 INFO agent.auxiliary_client: Vision auto-detect: using main provider custom (qwen3-coder:latest) 2026-04-22 23:06:20,864 INFO agent.model_metadata: Could not detect context length for model '' at http://192.168.1.13:11434/v1/ — defaulting to 128,000 tokens (probe-down). Set model.context_length in config.yaml to override. 2026-04-22 23:06:20,865 INFO agent.context_compressor: Context compressor initialized: model= context_length=128000 threshold=64000 (50%) target_ratio=20% tail_budget=12800 provider=none base_url=http://192.168.1.13:11434/v1/ 2026-04-22 23:06:20,907 INFO agent.auxiliary_client: Auxiliary auto-detect: using main provider custom (qwen3-coder:latest) 2026-04-22 23:06:20,909 INFO [20260422_230620_0e1b3c] run_agent: conversation turn: session=20260422_230620_0e1b3c model= provider=unknown platform=unknown history=0 msg='Tell me about the latest developments in Python 3.13 and what new features devel...' 2026-04-22 23:06:20,974 INFO run_agent: OpenAI client created (chat_completion_stream_request, shared=False) thread=Thread-1 (_call):124676862650048 provider= base_url=http://192.168.1.13:11434/v1/ model= 2026-04-22 23:06:21,347 INFO run_agent: Streaming failed before delivery: Error code: 400 - {'error': {'message': 'model is required', 'type': 'invalid_request_error', 'param': None, 'code': None}} 2026-04-22 23:06:21,348 INFO run_agent: OpenAI client closed (stream_request_complete, shared=False, tcp_force_closed=0) thread=Thread-1 (_call):124676862650048 provider= base_url=http://192.168.1.13:11434/v1/ model= 2026-04-22 23:06:21,349 WARNING [20260422_230620_0e1b3c] run_agent: API call failed (attempt 1/3) error_type=BadRequestError thread=MainThread:124677040678720 provider= base_url=http://192.168.1.13:11434/v1/ model= summary=HTTP 400: model is required 2026-04-22 23:06:21,356 ERROR [20260422_230620_0e1b3c] root: Non-retryable client error: Error code: 400 - {'error': {'message': 'model is required', 'type': 'invalid_request_error', 'param': None, 'code': None}} 2026-04-22 23:06:34,429 INFO hermes_cli.plugins: Plugin 'openai' registered image_gen provider: openai 2026-04-22 23:06:34,430 INFO hermes_cli.plugins: Plugin discovery complete: 2 found, 1 enabled 2026-04-22 23:06:34,511 INFO agent.auxiliary_client: Auxiliary auto-detect: using main provider custom (qwen3-coder:latest) 2026-04-22 23:06:34,519 INFO run_agent: OpenAI client created (agent_init, shared=True) thread=MainThread:128154899744576 provider= base_url=http://192.168.1.13:11434/v1/ model=

as the logs , OpenAI client cannot get the model info from the Ollama(local service) , I thinke this is a feature request . Are there any repair solutions?

Proposed Solution

have no idear now

Alternatives Considered

No response

Feature Type

New tool

Scope

None

Contribution

  • I'd like to implement this myself and submit a PR

Debug Report (optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High — major feature broken, no workaroundcomp/agentCore agent loop, run_agent.py, prompt builderprovider/ollamaOllama / local modelstype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions