[Bug]: OpenAI-compatible tool calls are returned as plain text when routed through PAIR
Maintainer thường phản hồi trong vòng 5 ngày
@kjlubick đang làm issue này rồi.
Từ ngày 1/10/2026.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
Hướng nghiên cứu
Bắt đầu từ điểm vào /v1/chat/completions của proxy Ollama và so sánh cách các yêu cầu và phản hồi được xử lý khi có các định nghĩa công cụ. Tái hiện bằng yêu cầu curl được ghi trong tài liệu gửi đến PAIR và trực tiếp đến Ollama, sau đó xác minh rằng PAIR giữ nguyên message.tool_calls và finish_reason: tool_calls thay vì trả về lệnh gọi dưới dạng văn bản.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
PAIR version or commit
0.1.1-463
Affected component
Ollama proxy
Environment
OS: Ubuntu 26.04.1 LTS on model host; Linux on NVIDIA DGX Spark PAIR client
Architecture: x86_64 model host; arm64 PAIR client
GPU and driver: AMD Radeon 8060S / Ryzen AI Max+ 395 on model host; NVIDIA GB10 on PAIR client
Engine and version: Ollama 0.33.2
Model: qwen3.6:27b
Cluster size: 4 nodes
Steps to reproduce
-
Configure a PAIR cluster with an Ollama node serving qwen3.6:27b.
-
Send an OpenAI-compatible POST request to:
/v1/chat/completionsThe request contains multiple OpenAI function/tool definitions and asks the model to work on a task for which it should call the
kanban_showfunction. -
Send the request through the PAIR Ollama proxy.
-
Send the exact same JSON request body directly to the Ollama server hosting qwen3.6:27b, bypassing PAIR.
-
Compare
finish_reason,message.content, andmessage.tool_callsin the two responses.
Repeated control test:
- Direct to Ollama: 3/3 requests returned a native
tool_callsobject. - Through PAIR: 3/3 requests returned
finish_reason: stopwith notool_callsobject. The intended function call instead appeared as ordinary assistant content.
The behavior is reproducible with curl and does not require an agent framework.
Expected behavior
When an OpenAI-compatible chat completion request containing tool definitions is routed through PAIR, native tool-calling behavior should be preserved.
For this request, the response should contain message.tool_calls with a call to kanban_show, and finish_reason should be tool_calls, matching the response obtained when the identical request is sent directly to the Ollama server.
Actual behavior
When the identical request is sent through the PAIR Ollama proxy, the native OpenAI-compatible tool call is not returned.
In repeated testing, PAIR returned:
finish_reason: stopmessage.tool_calls: null/ absent- The intended
kanban_showcall embedded inmessage.contentas ordinary text.
Three consecutive PAIR requests produced textual representations such as:
-
Python-like syntax:
kanban_show(task_id="t_65ba4229") -
Bracket syntax:
[kanban_show][0] -
XML-like syntax:
<invoke>kanban_show(task_id="t_65ba4229")</invoke>
By contrast, three consecutive requests using the identical JSON request body sent directly to Ollama returned native OpenAI-compatible tool calls:
finish_reason: tool_calls
with message.tool_calls containing a function call to kanban_show.
The same JSON payload succeeds when sent directly to the Ollama server on the model host, so the failure is introduced only when the request is routed through PAIR.
This also prevents OpenAI-compatible agent/tool frameworks from recognizing and executing the requested function when the request is routed through PAIR.
Sanitized logs or screenshots
Confirmations
- I searched existing issues for duplicates.
- This is not a security vulnerability.
- I agree to follow the Code of Conduct.
- Ngôn ngữ chính
- Go
- Star
- 1.6k
- Fork
- 266
- Merge trung bình
- 3 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 22
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NVIDIA/Personal-AI-Router
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
NVIDIA/Personal-AI-Router#165 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 46/100
NVIDIA/Personal-AI-Router#164 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
enhancement
Độ khó 4/5 Hơn một tuần Mức phù hợp với người mới 12/100
NVIDIA/Personal-AI-Router#162 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
NVIDIA/Personal-AI-Router#154 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 5 ngày
-
[Feature]: [Ollama] Alert the user about model pull failuresCó thể đã có người làm @ckelseynv đã nhận 3 ngày trước. Đang mởenhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 56/100
NVIDIA/Personal-AI-Router#152 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 5 ngày
Tất cả issue của NVIDIA/Personal-AI-Router
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
agent-review-finding bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
jordansmall/spindrift#5281 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Integer parameters equal to 2^63 pass the range check in toInt and wrap to a negative numberĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
github/github-mcp-server#3489 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
L: java:gradle L: java:maven L: ruby:bundler T: bug 🐞
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
dependabot/dependabot-core#16547 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Docs/examples still create key ranges in ascending order, which fails in 3.1.0 (follow-up to #1754)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
pg-sharding/spqr#3083 ·
Maintainer thường phản hồi trong vòng 1 ngày