mirror of
https://github.com/ollama/ollama.git
synced 2026-05-07 00:22:43 -05:00
[GH-ISSUE #11704] GPT-OSS 120B has malformed tool calls and I'm not sure if it is on the Ollama side or the gpt-oss side #69806
Closed
opened 2026-05-04 19:24:47 -05:00 by GiteaMirror
·
30 comments
No Branch/Tag Specified
main
hoyyeva/anthropic-local-image-path
dhiltgen/ci
dhiltgen/llama-runner
parth-remove-claude-desktop-launch
hoyyeva/anthropic-reference-images-path
parth-anthropic-reference-images-path
brucemacd/download-before-remove
hoyyeva/editor-config-repair
parth-mlx-decode-checkpoints
parth-launch-codex-app
hoyyeva/fix-codex-model-metadata-warning
hoyyeva/qwen
parth/hide-claude-desktop-till-release
hoyyeva/opencode-image-modality
parth-add-claude-code-autoinstall
release_v0.22.0
pdevine/manifest-list
codex/fix-codex-model-metadata-warning
pdevine/addressable-manifest
brucemacd/launch-fetch-reccomended
jmorganca/llama-compat
launch-copilot-cli
hoyyeva/opencode-thinking
release_v0.20.7
parth-auto-save-backup
parth-test
jmorganca/gemma4-audio-replacements
fix-manifest-digest-on-pull
hoyyeva/vscode-improve
brucemacd/install-server-wait
parth/update-claude-docs
brucemac/start-ap-install
pdevine/mlx-update
pdevine/qwen35_vision
drifkin/api-show-fallback
mintlify/image-generation-1773352582
hoyyeva/server-context-length-local-config
jmorganca/faster-reptition-penalties
jmorganca/convert-nemotron
parth-pi-thinking
pdevine/sampling-penalties
jmorganca/fix-create-quantization-memory
dongchen/resumable_transfer_fix
pdevine/sampling-cache-error
jessegross/mlx-usage
hoyyeva/openclaw-config
hoyyeva/app-html
pdevine/qwen3next
brucemacd/sign-sh-install
brucemacd/tui-update
brucemacd/usage-api
jmorganca/launch-empty
fix-app-dist-embed
mxyng/mlx-compile
mxyng/mlx-quant
mxyng/mlx-glm4.7
mxyng/mlx
brucemacd/simplify-model-picker
jmorganca/qwen3-concurrent
fix-glm-4.7-flash-mla-config
drifkin/qwen3-coder-opening-tag
brucemacd/usage-cli
fix-cuda12-fattn-shmem
ollama-imagegen-docs
parth/fix-multiline-inputs
brucemacd/config-docs
mxyng/model-files
mxyng/simple-execute
fix-imagegen-ollama-models
mxyng/async-upload
jmorganca/lazy-no-dtype-changes
imagegen-auto-detect-create
parth/decrease-concurrent-download-hf
fix-mlx-quantize-init
jmorganca/x-cleanup
usage
imagegen-readme
jmorganca/glm-image
mlx-gpu-cd
jmorganca/imagegen-modelfile
parth/agent-skills
parth/agent-allowlist
parth/signed-in-offline
parth/agents
parth/fix-context-chopping
improve-cloud-flow
parth/add-models-websearch
parth/prompt-renderer-mcp
jmorganca/native-settings
jmorganca/download-stream-hash
jmorganca/client2-rebased
brucemacd/oai-chat-req-multipart
jessegross/multi_chunk_reserve
grace/additional-omit-empty
grace/mistral-3-large
mxyng/tokenizer2
mxyng/tokenizer
jessegross/flash
hoyyeva/windows-nacked-app
mxyng/cleanup-attention
grace/deepseek-parser
hoyyeva/remember-unsent-prompt
parth/add-lfs-pointer-error-conversion
parth/olmo2-test2
hoyyeva/ollama-launchagent-plist
nicole/olmo-model
parth/olmo-test
mxyng/remove-embedded
parth/render-template
jmorganca/intellect-3
parth/remove-prealloc-linter
jmorganca/cmd-eval
nicole/nomic-embed-text-fix
mxyng/lint-2
hoyyeva/add-gemini-3-pro-preview
hoyyeva/load-model-list
mxyng/expand-path
mxyng/environ-2
hoyyeva/deeplink-json-encoding
parth/improve-tool-calling-tests
hoyyeva/conversation
hoyyeva/assistant-edit-response
hoyyeva/thinking
origin/brucemacd/invalid-char-i-err
parth/improve-tool-calling
jmorganca/required-omitempty
grace/qwen3-vl-tests
mxyng/iter-client
parth/docs-readme
nicole/embed-test
pdevine/integration-benchstat
parth/remove-generate-cmd
parth/add-toolcall-id
mxyng/server-tests
jmorganca/glm-4.6
jmorganca/gin-h-compat
drifkin/stable-tool-args
pdevine/qwen3-more-thinking
parth/add-websearch-client
nicole/websearch_local
jmorganca/qwen3-coder-updates
grace/deepseek-v3-migration-tests
mxyng/fix-create
jmorganca/cloud-errors
pdevine/parser-tidy
revert-12233-parth/simplify-entrypoints-runner
parth/enable-so-gpt-oss
brucemacd/qwen3vl
jmorganca/readme-simplify
parth/gpt-oss-structured-outputs
revert-12039-jmorganca/tools-braces
mxyng/embeddings
mxyng/gguf
mxyng/benchmark
mxyng/types-null
parth/move-parsing
mxyng/gemma2
jmorganca/docs
mxyng/16-bit
mxyng/create-stdin
pdevine/authorizedkeys
mxyng/quant
parth/opt-in-error-context-window
brucemacd/cache-models
brucemacd/runner-completion
jmorganca/llama-update-6
brucemacd/benchmark-list
brucemacd/partial-read-caps
parth/deepseek-r1-tools
mxyng/omit-array
parth/tool-prefix-temp
brucemacd/runner-test
jmorganca/qwen25vl
brucemacd/model-forward-test-ext
parth/python-function-parsing
jmorganca/cuda-compression-none
drifkin/num-parallel
drifkin/chat-truncation-fix
jmorganca/sync
parth/python-tools-calling
drifkin/array-head-count
brucemacd/create-no-loop
parth/server-enable-content-stream-with-tools
qwen25omni
mxyng/v3
brucemacd/ropeconfig
jmorganca/silence-tokenizer
parth/sample-so-test
parth/sampling-structured-outputs
brucemacd/doc-go-engine
parth/constrained-sampling-json
jmorganca/mistral-wip
brucemacd/mistral-small-convert
parth/sample-unmarshal-json-for-params
brucemacd/jomorganca/mistral
pdevine/bfloat16
jmorganca/mistral
brucemacd/mistral
pdevine/logging
parth/sample-correctness-fix
parth/sample-fix-sorting
jmorgan/sample-fix-sorting-extras
jmorganca/temp-0-images
brucemacd/parallel-embed-models
brucemacd/shim-grammar
jmorganca/fix-gguf-error
bmizerany/nameswork
jmorganca/faster-releases
bmizerany/validatenames
brucemacd/err-no-vocab
brucemacd/rope-config
brucemacd/err-hint
brucemacd/qwen2_5
brucemacd/logprobs
brucemacd/new_runner_graph_bench
progress-flicker
brucemacd/forward-test
brucemacd/go_qwen2
pdevine/gemma2
jmorganca/add-missing-symlink-eval
mxyng/next-debug
parth/set-context-size-openai
brucemacd/next-bpe-bench
brucemacd/next-bpe-test
brucemacd/new_runner_e2e
brucemacd/new_runner_qwen2
pdevine/convert-cohere2
brucemacd/convert-cli
parth/log-probs
mxyng/next-mlx
mxyng/cmd-history
parth/templating
parth/tokenize-detokenize
brucemacd/check-key-register
bmizerany/grammar
jmorganca/vendor-081b29bd
mxyng/func-checks
jmorganca/fix-null-format
parth/fix-default-to-warn-json
jmorganca/qwen2vl
jmorganca/no-concat
parth/cmd-cleanup-SO
brucemacd/check-key-register-structured-err
parth/openai-stream-usage
parth/fix-referencing-so
stream-tools-stop
jmorganca/degin-1
brucemacd/install-path-clean
brucemacd/push-name-validation
brucemacd/browser-key-register
jmorganca/openai-fix-first-message
jmorganca/fix-proxy
jessegross/sample
parth/disallow-streaming-tools
dhiltgen/remove_submodule
jmorganca/ga
jmorganca/mllama
pdevine/newlines
pdevine/geems-2b
jmorganca/llama-bump
mxyng/modelname-7
mxyng/gin-slog
mxyng/modelname-6
jyan/convert-prog
jyan/quant5
paligemma-support
pdevine/import-docs
jmorganca/openai-context
jyan/paligemma
jyan/p2
jyan/palitest
bmizerany/embedspeedup
jmorganca/llama-vit
brucemacd/allow-ollama
royh/ep-methods
royh/whisper
mxyng/api-models
mxyng/fix-memory
jyan/q4_4/8
jyan/ollama-v
royh/stream-tools
roy-embed-parallel
bmizerany/hrm
revert-5963-revert-5924-mxyng/llama3.1-rope
royh/embed-viz
jyan/local2
jyan/auth
jyan/local
jyan/parse-temp
jmorganca/template-mistral
jyan/reord-g
royh-openai-suffixdocs
royh-imgembed
royh-embed-parallel
jyan/quant4
royh-precision
jyan/progress
pdevine/fix-template
jyan/quant3
pdevine/ggla
mxyng/update-registry-domain
jmorganca/ggml-static
mxyng/create-context
jyan/v0.146
mxyng/layers-from-files
build_dist
bmizerany/noseek
royh-ls
royh-name
timeout
mxyng/server-timestamp
bmizerany/nosillyggufslurps
royh-params
jmorganca/llama-cpp-7c26775
royh-openai-delete
royh-show-rigid
jmorganca/enable-fa
jmorganca/no-error-template
jyan/format
royh-testdelete
bmizerany/fastverify
language_support
pdevine/ps-glitches
brucemacd/tokenize
bruce/iq-quants
bmizerany/filepathwithcoloninhost
mxyng/split-bin
bmizerany/client-registry
jmorganca/if-none-match
native
jmorganca/native
jmorganca/batch-embeddings
jmorganca/initcmake
jmorganca/mm
pdevine/showggmlinfo
modenameenforcealphanum
bmizerany/modenameenforcealphanum
jmorganca/done-reason
jmorganca/llama-cpp-8960fe8
ollama.com
bmizerany/filepathnobuild
bmizerany/types/model/defaultfix
rmdisplaylong
nogogen
bmizerany/x
modelfile-readme
bmizerany/replacecolon
jmorganca/limit
jmorganca/execstack
jmorganca/replace-assets
mxyng/tune-concurrency
jmorganca/testing
whitespace-detection
jmorganca/options
upgrade-all
scratch
cuda-search
mattw/airenamer
mattw/allmodelsonhuggingface
mattw/quantcontext
mattw/whatneedstorun
brucemacd/llama-mem-calc
mattw/faq-context
mattw/communitylinks
mattw/noprune
mattw/python-functioncalling
rename
mxyng/install
pulse
remove-first
editor
mattw/selfqueryingretrieval
cgo
mattw/howtoquant
api
matt/streamingapi
format-config
mxyng/extra-args
shell
update-nous-hermes
cp-model
upload-progress
fix-unknown-model
fix-model-names
delete-fix
insecure-registry
ls
deletemodels
progressbar
readme-updates
license-layers
skip-list
list-models
modelpath
matt/examplemodelfiles
distribution
go-opts
v0.30.0-rc3
v0.30.0-rc2
v0.30.0-rc1
v0.30.0-rc0
v0.23.1
v0.23.1-rc0
v0.23.0
v0.23.0-rc0
v0.22.1
v0.22.1-rc1
v0.22.1-rc0
v0.22.0
v0.22.0-rc1
v0.21.3-rc0
v0.21.2-rc1
v0.21.2
v0.21.2-rc0
v0.21.1
v0.21.1-rc1
v0.21.1-rc0
v0.21.0
v0.21.0-rc1
v0.21.0-rc0
v0.20.8-rc0
v0.20.7
v0.20.7-rc1
v0.20.7-rc0
v0.20.6
v0.20.6-rc1
v0.20.6-rc0
v0.20.5
v0.20.5-rc2
v0.20.5-rc1
v0.20.5-rc0
v0.20.4
v0.20.4-rc2
v0.20.4-rc1
v0.20.4-rc0
v0.20.3
v0.20.3-rc0
v0.20.2
v0.20.1
v0.20.1-rc2
v0.20.1-rc1
v0.20.1-rc0
v0.20.0
v0.20.0-rc1
v0.20.0-rc0
v0.19.0
v0.19.0-rc2
v0.19.0-rc1
v0.19.0-rc0
v0.18.4-rc1
v0.18.4-rc0
v0.18.3
v0.18.3-rc2
v0.18.3-rc1
v0.18.3-rc0
v0.18.2
v0.18.2-rc1
v0.18.2-rc0
v0.18.1
v0.18.1-rc1
v0.18.1-rc0
v0.18.0
v0.18.0-rc2
v0.18.0-rc1
v0.18.0-rc0
v0.17.8-rc4
v0.17.8-rc3
v0.17.8-rc2
v0.17.8-rc1
v0.17.8-rc0
v0.17.7
v0.17.7-rc2
v0.17.7-rc1
v0.17.7-rc0
v0.17.6
v0.17.5
v0.17.4
v0.17.3
v0.17.2
v0.17.1
v0.17.1-rc2
v0.17.1-rc1
v0.17.1-rc0
v0.17.0
v0.17.0-rc2
v0.17.0-rc1
v0.17.0-rc0
v0.16.3
v0.16.3-rc2
v0.16.3-rc1
v0.16.3-rc0
v0.16.2
v0.16.2-rc0
v0.16.1
v0.16.0
v0.16.0-rc2
v0.16.0-rc0
v0.16.0-rc1
v0.15.6
v0.15.5
v0.15.5-rc5
v0.15.5-rc4
v0.15.5-rc3
v0.15.5-rc2
v0.15.5-rc1
v0.15.5-rc0
v0.15.4
v0.15.3
v0.15.2
v0.15.1
v0.15.1-rc1
v0.15.1-rc0
v0.15.0-rc6
v0.15.0
v0.15.0-rc5
v0.15.0-rc4
v0.15.0-rc3
v0.15.0-rc2
v0.15.0-rc1
v0.15.0-rc0
v0.14.3
v0.14.3-rc3
v0.14.3-rc2
v0.14.3-rc1
v0.14.3-rc0
v0.14.2
v0.14.2-rc1
v0.14.2-rc0
v0.14.1
v0.14.0-rc11
v0.14.0
v0.14.0-rc10
v0.14.0-rc9
v0.14.0-rc8
v0.14.0-rc7
v0.14.0-rc6
v0.14.0-rc5
v0.14.0-rc4
v0.14.0-rc3
v0.14.0-rc2
v0.14.0-rc1
v0.14.0-rc0
v0.13.5
v0.13.5-rc1
v0.13.5-rc0
v0.13.4-rc2
v0.13.4
v0.13.4-rc1
v0.13.4-rc0
v0.13.3
v0.13.3-rc1
v0.13.3-rc0
v0.13.2
v0.13.2-rc2
v0.13.2-rc1
v0.13.2-rc0
v0.13.1
v0.13.1-rc2
v0.13.1-rc1
v0.13.1-rc0
v0.13.0
v0.13.0-rc0
v0.12.11
v0.12.11-rc1
v0.12.11-rc0
v0.12.10
v0.12.10-rc1
v0.12.10-rc0
v0.12.9-rc0
v0.12.9
v0.12.8
v0.12.8-rc0
v0.12.7
v0.12.7-rc1
v0.12.7-rc0
v0.12.7-citest0
v0.12.6
v0.12.6-rc1
v0.12.6-rc0
v0.12.5
v0.12.5-rc0
v0.12.4
v0.12.4-rc7
v0.12.4-rc6
v0.12.4-rc5
v0.12.4-rc4
v0.12.4-rc3
v0.12.4-rc2
v0.12.4-rc1
v0.12.4-rc0
v0.12.3
v0.12.2
v0.12.2-rc0
v0.12.1
v0.12.1-rc1
v0.12.1-rc2
v0.12.1-rc0
v0.12.0
v0.12.0-rc1
v0.12.0-rc0
v0.11.11
v0.11.11-rc3
v0.11.11-rc2
v0.11.11-rc1
v0.11.11-rc0
v0.11.10
v0.11.9
v0.11.9-rc0
v0.11.8
v0.11.8-rc0
v0.11.7-rc1
v0.11.7-rc0
v0.11.7
v0.11.6
v0.11.6-rc0
v0.11.5-rc4
v0.11.5-rc3
v0.11.5
v0.11.5-rc5
v0.11.5-rc2
v0.11.5-rc1
v0.11.5-rc0
v0.11.4
v0.11.4-rc0
v0.11.3
v0.11.3-rc0
v0.11.2
v0.11.1
v0.11.0-rc0
v0.11.0-rc1
v0.11.0-rc2
v0.11.0
v0.10.2-int1
v0.10.1
v0.10.0
v0.10.0-rc4
v0.10.0-rc3
v0.10.0-rc2
v0.10.0-rc1
v0.10.0-rc0
v0.9.7-rc1
v0.9.7-rc0
v0.9.6
v0.9.6-rc0
v0.9.6-ci0
v0.9.5
v0.9.4-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-rc4
v0.1.33-rc3
v0.1.33-rc2
v0.1.33-rc1
v0.1.32
v0.1.32-rc2
v0.1.32-rc1
v0.1.31
v0.1.30
v0.1.29
v0.1.28
v0.1.27
v0.1.26
v0.1.25
v0.1.24
v0.1.23
v0.1.22
v0.1.21
v0.1.20
v0.1.19
v0.1.18
v0.1.17
v0.1.16
v0.1.15
v0.1.14
v0.1.13
v0.1.12
v0.1.11
v0.1.10
v0.1.9
v0.1.8
v0.1.7
v0.1.6
v0.1.5
v0.1.4
v0.1.3
v0.1.2
v0.1.1
v0.1.0
v0.0.21
v0.0.20
v0.0.19
v0.0.18
v0.0.17
v0.0.16
v0.0.15
v0.0.14
v0.0.13
v0.0.12
v0.0.11
v0.0.10
v0.0.9
v0.0.8
v0.0.7
v0.0.6
v0.0.5
v0.0.4
v0.0.3
v0.0.2
v0.0.1
Labels
Clear labels
amd
api
app
bug
build
cli
cloud
compatibility
context-length
create
docker
documentation
embeddings
feature request
feedback wanted
good first issue
gpt-oss
gpu
harmony
help wanted
image
install
intel
js
launch
linux
macos
memory
mlx
model
needs more info
networking
nvidia
ollama.com
performance
pull-request
python
question
registry
rendering
thinking
tools
top
vulkan
windows
wsl
Mirrored from GitHub Pull Request
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/ollama#69806
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @spullara on GitHub (Aug 5, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/11704
What is the issue?
This is a very common problem with the calls
{ "id" : "chatcmpl-655", "object" : "chat.completion", "created" : 1754434322, "model" : "gpt-oss:120b", "system_fingerprint" : "fp_ollama", "choices" : [ { "index" : 0, "message" : { "role" : "assistant", "content" : "", "reasoning" : "Now run.", "tool_calls" : [ { "id" : "call_98a1uqe2", "index" : 0, "type" : "function", "function" : { "name" : "assistant<|channel|>analysis", "arguments" : "{\"command\":\"./test\"}" } } ] }, "finish_reason" : "tool_calls" } ], "usage" : { "prompt_tokens" : 511, "completion_tokens" : 29, "total_tokens" : 540 } }Name of the tool ought to be 'exec' rather than 'assistant<|channel|>analysis ' and it mostly calls it correctly and sometimes this happens.
Relevant log output
OS
No response
GPU
No response
CPU
No response
Ollama version
No response
@drifkin commented on GitHub (Aug 6, 2025):
would you happen to have a repro we could try? even if fairly unreliable
@spullara commented on GitHub (Aug 6, 2025):
this request got that response and is probably reproducible:
{ "max_tokens" : 128000, "messages" : [ { "content" : "Current datetime: Tue Aug 05 15:51:52 PDT 2025\nOperating system: Mac OS X\nCurrent directory:/Users/sam/Projects/scriptagent\nCurrent user: sam\n\nWrite Hello, world! in a file called test.c. Compile it. Run it. Delete it.\n\n\nNever use parallel tool calls.\n", "role" : "user" }, { "role" : "assistant", "content" : "", "reasoning" : "We need to write a C file test.c with Hello, world! program, compile (e.g., using clang or gcc), run it, then delete both source and binary? The request: \"Delete it.\" Could refer to delete the file? Probably delete the compiled binary and source file. We'll use shell commands via exec. Steps:\n\n1. Write test.c using write_file tool.\n2. Compile: gcc test.c -o test (or clang). Use exec.\n3. Run the binary: ./test\n4. Delete files: rm test.c test (binary). Use exec.\n\nWe need to abide never use parallel tool calls: we must do sequential. We'll use functions.exec and functions.write_file and functions.complete at end.\n\nWe'll capture outputs. Let's proceed.\n\n", "tool_calls" : [ { "id" : "call_t2l9i8q6", "index" : 0, "type" : "function", "function" : { "name" : "write_file", "arguments" : "{\"append\":false,\"contents\":\"#include \\u003cstdio.h\\u003e\\n\\nint main() {\\n printf(\\\"Hello, world!\\\\n\\\");\\n return 0;\\n}\\n\",\"filename\":\"test.c\"}" } } ] }, { "role" : "tool", "content" : "File written: test.c", "name" : "write_file", "tool_call_id" : "call_t2l9i8q6" }, { "role" : "assistant", "content" : "", "reasoning" : "Now compile.", "tool_calls" : [ { "id" : "call_mw86vc9y", "index" : 0, "type" : "function", "function" : { "name" : "exec", "arguments" : "{\"command\":\"gcc test.c -o test\"}" } } ] }, { "role" : "tool", "content" : "Exit code: 0", "name" : "exec", "tool_call_id" : "call_mw86vc9y" } ], "tool_choice" : "required", "model" : "gpt-oss:120b", "tools" : [ { "function" : { "name" : "exec", "description" : "Executes a shell command and returns its output", "parameters" : { "type" : "object", "properties" : { "command" : { "description" : "The command to execute appropriate for operating system", "type" : "string" } }, "required" : [ "command" ] } }, "type" : "function" }, { "function" : { "name" : "write_file", "description" : "Writes a file with the given contents", "parameters" : { "type" : "object", "properties" : { "filename" : { "description" : "The filename of the file to write", "type" : "string" }, "contents" : { "description" : "The contents of the file", "type" : "string" }, "append" : { "description" : "Whether to append to the file", "type" : "boolean" } }, "required" : [ "filename", "contents" ] } }, "type" : "function" }, { "function" : { "name" : "complete", "description" : "Complete the script execution with a result or error. You must do this. This tool is how the user will see any output from the task.", "parameters" : { "type" : "object", "properties" : { "result" : { "description" : "The final result or error message", "type" : "string" } }, "required" : [ "result" ] } }, "type" : "function" } ] }@m0n5t3r commented on GitHub (Aug 6, 2025):
for what it's worth, gpt-oss 20B throws an error when you pass it tools from openwebui:
I'll have to write a script with direct calls and the least amount of moving parts to isolate the issue and make sure it's not me or openwebui (the tool is something I wrote, and it works fine with other models - llama 3.1 8b, gemma3-tools 4b, qwen3 8b, etc.)
@imumesh18 commented on GitHub (Aug 6, 2025):
Your issue was fixed in this pr: https://github.com/ollama/ollama/pull/11705 @m0n5t3r
@CanadaHonk commented on GitHub (Aug 6, 2025):
I'm on 0.11.3 which should include that PR but still get this:
@xNefas commented on GitHub (Aug 6, 2025):
Same issue here:
Yet I'm getting this error when trying to use gpt-oss:20b with Zed as the front-end:
@abrahamadamu commented on GitHub (Aug 6, 2025):
The new OSS model seems to be sending inconsistent tool call JSON for the same type of requests. The second one seems to break it.
It sometimes sends this and causes error throwing in langchain.
@spullara commented on GitHub (Aug 6, 2025):
These look like very common hallucinations for small models trying to use tools.
@spullara commented on GitHub (Aug 6, 2025):
for my repro request above, easiest way is to put it in a file called gptoss.json and run this command until you see the failure
curl -d @gptoss.json -H "content-type: application/json" http://localhost:11434/v1/chat/completions | jq .In addition to the name "assistant<|channel|>analysis" I have also seen the name as "assistant<|channel|>commentary" and just "assistant".
@drifkin commented on GitHub (Aug 6, 2025):
thanks @spullara! Have it reproing with that, investigating now
@drifkin commented on GitHub (Aug 6, 2025):
@spullara: I fixed the main issue causing this in #11759, which we'll put in the next release. I'm keeping this open while I investigate one more issue around tool calling quality, particularly for gpt-oss. I'll update this thread once I'm done with the followup
@neophob commented on GitHub (Aug 8, 2025):
v0.11.4/gpt-oss 20B still fails with
Error Failed to connect to Ollama API: 500 Internal Server Error {"error":"template: :108:130: executing \"\" at \u003cindex $prop.Type 0\u003e: error calling index: reflect: slice index out of range"}@m0n5t3r commented on GitHub (Aug 8, 2025):
for the slice index out of range errors, check the definitions of the tools being sent; in my case, openwebui seems to send all methods from the
Toolsclass to the model, and I think these models don't like when the parameters aren't type annotated or something... after I moved all helper methods to a separate class it worked for me (the only way to see what's being sent I could figure out wastcpdump -nvviAi any tcp and port 11434, but there has to be a more civilized way 😀)@MarkWard0110 commented on GitHub (Aug 8, 2025):
https://github.com/ollama/ollama/issues/11800
@jvsteiner commented on GitHub (Aug 8, 2025):
I fixed this same issue locally for myself. details here: https://github.com/ollama/ollama/issues/11800
@spullara commented on GitHub (Aug 8, 2025):
version 0.11.4 fixes my tool calling issue that opened this issue. I think it is expected that the model doesn't follow the tool call required flag. if it is supposed to, I can open a bug for that.
@drifkin commented on GitHub (Aug 8, 2025):
that's correct, we don't support that required field currently. Thanks again for reporting, going to close out this issue now that it's fixed!
the other issues in this thread look to be related to https://github.com/ollama/ollama/pull/11705, which will have the template part pushed out later today. It'll require pulling the model again to update the template (but won't require redownloading any weights)
@moll commented on GitHub (Aug 8, 2025):
I'm not sure if this falls under the current issue, but I just got a tool call for
assistant<|channel|>commentaryout of gpt-oss:20b with Ollama v0.11.4. So there's definitely more misparsing or just invalid output going on.@drifkin commented on GitHub (Aug 8, 2025):
@moll could you provide a repro or some logs with
OLLAMA_DEBUG=2set? Or more details about how/where you're using this model from. There are lots of different reasons the model might do that, we're seeing that if the name isn't provided for a function call then followups might end up with strange tool call names. I'll be adding some validation so we warn or fail in that case instead of passing an iffy prompt to the model@moll commented on GitHub (Aug 8, 2025):
Absolutely. Thanks! I'll try to set up a reproducible /chat request that triggers this. I'll get to it tomorrow.
Otherwise it's the gpt-oss:20b from Ollama's library with no overridden params other than context set to 16k.
@drifkin commented on GitHub (Aug 8, 2025):
Awesome, thank you!
@MarkWard0110 commented on GitHub (Aug 8, 2025):
I found updating my client to support the "thinking" field has fixed this error for me. My client is providing the assistant's thinking back into the chat now and I have not seen the 500 error from Ollama yet.
@spullara commented on GitHub (Aug 8, 2025):
Testing with my request up there on 20b I don't get any failures in dozens of attempts.
@moll commented on GitHub (Aug 9, 2025):
So, @drifkin, I've seen all sorts of oddness this morning, so I'll try so share one of these reproducible cases now.
For context, Ollama v0.11.4 (from Arch Linux repo) was configured as such:
I remember seeing someone mention KV quantizing may not work with OpenAI's GPT-OSS, so perhaps that gets ignored here. We're really not debugging the model acting weird (that's to be expected), but rather Ollama which ought to do something sensible in all situations.
I picked a real-life request I was testing with: 1-invalid-character-c-looking-for-beginning-request.json
I ran it with HTTPie, but any other HTTP client will work just as fine:
The streaming variant first thought for a bit, then failed with:
Note the error message is probably under the wrong key, for which I made https://github.com/ollama/ollama/issues/11781 on Thursday.
Here's the Systemd journal for the streaming request: 1-journal-stream.log
Then out of curiosity, I switched streaming off in the request above (everything else identical). This failed with:
The Systemd journal for non-streaming request: 1-journal-nostream.log
Both requests seem consistently reproducible since there's also a seed. I'll come back a little later with some test cases where Ollama ends up interpreting analysis as a tool call etc.
One other thing I've thought of and is relevant given how much time all spend reporting parsing errors — how would you feel if Ollama had an option to both:
I find the model running and request API of Ollama convenient, but since smaller models often fail to produce fully valid tool calls, I'd like to parse the output myself. Then I can be more lenient and fix up some smaller issues faster than waiting on Ollama. Of course ideally we'd all be sampling tokens to always produce valid output, but getting the raw output would be a decent middle-way. It'd align nicely with the existence of
raw=trueAPI param, which right now seems to disable both request templating and response parsing. I'm after only disabling response parsing.The raw tokens would be vital to have even more resilience and security — permitting differentiating special tokens from messages/tool calls that refer to
<|start|>as regular text. Converting from tokens back to text is, after all, a straightforward transformation for an app.Thanks!
@kha84 commented on GitHub (Aug 11, 2025):
I have updated to the latest version of ollama (which is 0.11.4 as of now). I'm using an official
ollamapython library (0.5.3) and still constantly getting 500 errors with gpt-oss:20b:I'm not using any tools - just plain chat calls like
res = OllamaClient.chat(model=model_name, messages=messages)and some custom scaffolding around it. I even tested it with overriding the default three-pages-long TEMPLATE with my much more simpler version of TEMPLATE, inherited from simpler models like qwen2.5. With that template gpt-oss:20b acts much more stable, but still prune to 500 time to time.Is it ollama here who tries (and fails) to parse the output from a model?
@drifkin commented on GitHub (Aug 12, 2025):
thanks @moll! Repros easily for me, thanks for setting it all up in such a convenient way.
I still need to look into it more, but my current suspicion is that this particular model doesn't like hyphens in tool names, which is consistent with the tool definition format being heavily typescript influenced (and hyphens aren't valid in typescript identifiers).
The raw (pretty-printed with newlines after each message to read more easily) output I get from the model is:
with the input prompt (also pretty-printed) being:
So from a first glance, it looks like the model invents another tool response, possibly because it thinks the previous call was never answered because it's confused by the tool name? I'll test out this hunch more in depth soon.
Our harmony parser could detect this situation and ignore messages that don't make sense, like a tool call response. But I'd rather root cause this first, since I suspect that this would just paper over quality issues. If it turns out this is caused by the hyphens, we can transform the identifiers to something safer (and even undo the transformation on the way out so it's transparent), or maybe we'll just be stricter about the function names.
If I change the function names to to underscores it seems to correctly call the tool. I'm not confident that's actually a fix though, maybe it's perturbing the input enough to just make it not happen in this particular instance? Anyway, I'll continue investigating.
Regarding your comments about debuggability, I've been planning on creating a debug mode to the chat api where it simply returns the rendered prompt instead of executing it. I think this would then mostly give you what you want: you should then be able to send that to a raw generate call and parse yourself. It would be the text instead of the raw tokens, but I'm also considering how to provide that as well, since it's another thing we often want for debugging.
@drifkin commented on GitHub (Aug 12, 2025):
@kha84: I've fixed the error message to be more descriptive in #11861 (thanks again @moll!), which will be in the next release. Do you have a small repro by any chance? Or do you remember what kind of tool names you used?
@kha84 commented on GitHub (Aug 12, 2025):
As I said I didn't use any tools at all. I'll try to make something reproducible to share. I have a gut feeling that this 500 more likely to happen if JSON was appearing in the chat history (in messages)
@drifkin commented on GitHub (Aug 12, 2025):
oops sorry, somehow I missed that 🙈
let's continue in https://github.com/ollama/ollama-python/issues/557, would love to track that down as well
@drifkin commented on GitHub (Aug 12, 2025):
@moll: looking again at
1-invalid-character-c-looking-for-beginning-request.json, I believe the underlying problem is that there's a missing tool call in the message history:the tool result is the 4th message, but the 3rd message doesn't contain the expected tool call, and I think this confuses the model.
If I truncate your messages down to the 2nd message, I see that it successfully generates a message that includes a
tool_callsfield:Request
Response:
If I then make a request with that message appended to the existing list, I get another successful followup tool call:
My suspicion is when you're building up the conversation array, the
tool_callsfield might be getting dropped? We can add validation/warning when we notice this in the input array to make this more obvious