Repository navigation
Python: Add service_url to OllamaChatClient - #9222
Merged
Eduard van Valkenburg (eavanvalkenburg) merged 1 commit intoOct 9, 2026
Merged
Eduard van Valkenburg (eavanvalkenburg) merged 1 commit into
Eduard van Valkenburg (eavanvalkenburg) merged 1 commit into
Conversation
Report the Ollama host as server.address in chat telemetry instead of the base class default of Unknown, matching OllamaEmbeddingClient and the other provider chat clients.
Bicheng (Kenneth) (BichengWang)
requested review from
SergeyMenshykh,
Tao Chen (TaoChenOSU),
Eduard van Valkenburg (eavanvalkenburg),
Giles Odigwe (giles17),
Jose Alvarez (jpalvarezl),
Evan Mattson (moonbox3),
Roger Barreto (rogerbarreto),
sophia-ramsey and
westey (westey-m)
as code owners
October 8, 2026 19:45
Bicheng (Kenneth) (BichengWang)
temporarily deployed
to
github-app-auth
October 8, 2026 19:45 — with
GitHub Actions
Inactive
Bicheng (Kenneth) (BichengWang)
temporarily deployed
to
github-app-auth
October 8, 2026 19:45 — with
GitHub Actions
Inactive
Bicheng (Kenneth) (BichengWang)
temporarily deployed
to
github-app-auth
October 8, 2026 19:45 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused implementation matches existing provider behavior and includes appropriate unit coverage.
0 open findings
What changed in this PR
Adds Ollama chat service URL reporting for telemetry.
Changes:
- Returns the resolved Ollama host from
service_url(). - Adds unit coverage for a custom host.
| File | Description |
|---|---|
python/packages/ollama/agent_framework_ollama/_chat_client.py |
Exposes the resolved host for telemetry. |
python/packages/ollama/tests/test_ollama_chat_client.py |
Tests service URL reporting. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Contributor
Author
|
Hello members, is there any one can help additional review? Thank you! |
Eduard van Valkenburg (eavanvalkenburg)
approved these changes
Oct 9, 2026
Bicheng (Kenneth) (BichengWang)
deleted the
ollama-chat-client-service-url
branch
October 9, 2026 17:57
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation & Context
OllamaChatClientdoes not overrideBaseChatClient.service_url(), so chat spans reportserver.addressasUnknown.OllamaEmbeddingClientand the Anthropic, Bedrock, Gemini, Mistral and OpenAI chat-completion clients already implement it.Description & Review Guide
OllamaChatClient.service_url()returnsself.host, which is already populated in__init__. One unit test added.Related Issue
Fixes #9221
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.