Skip to content

base_url not honored for ollama #1734

@raokrutarth

Description

@raokrutarth

What version of Codex is running?

codex-cli 0.0.2505291458

Which model were you using?

ollama

What platform is your computer?

Linux 5.4.0-216-generic x86_64 x86_64

What steps can reproduce the bug?

The ollama base url is hardcoded to port 11434 (

base_url = "http://localhost:11434/v1"
) and doesn't work with any other ports. I need to run ollama on another port (11438) and the codex cli keeps making requests to port 11434

config.toml:

[model_providers.ollama]
name = "Ollama"
base_url = "http://localhost:11438/v1"
wire_api = "chat"

[profiles.ol]
model_provider = "ollama"
model = "mistral-small3.2:latest"

What is the expected behavior?

Honor the base_url config when invoking ollama

What do you see instead?

No response

Additional information

Also tried OPENAI_BASE_URL="http://localhost:11438/v1" codex exec --profile ol --model mistral-small3.2:latest "follow instructions in ./Task.md"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions