[BUG] v2.1.20 breaks Ollama gpt-oss support

Resolved 💬 3 comments Opened Jan 27, 2026 by ch-j Closed Jan 27, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

latest version v2.1.20 breaks gpt-oss support with Ollama

On ollama host

Jan 27 10:22:22 ollama[3731894]: time=2026-01-27T10:22:22.443-05:00 level=ERROR source=routes.go:2152 msg="chat prompt error" error="template: :108:130: executing \"\" at <index $prop.Type 0>: error calling index: reflect: slice index out of range"

reverting to v2.1.19 works

What Should Happen?

claude code should work with ollama gpt-oss:20b

Error Messages/Logs

Jan 27 10:22:22 ollama[3731894]: time=2026-01-27T10:22:22.443-05:00 level=ERROR source=routes.go:2152 msg="chat prompt error" error="template: :108:130: executing \"\" at <index $prop.Type 0>: error calling index: reflect: slice index out of range"

Steps to Reproduce

export ANTHROPIC_BASE_URL=http://<ollamahost>:11434; export ANTHROPIC_AUTH_TOKEN=ollama; claude --model gpt-oss:20b

❯ hello                                                                        

  ⎿  500 {"type":"error","error":{"type":"api_error","message":"template:      

     :108:130: executing \"\" at <index $prop.Type 0>: error calling index:    

     reflect: slice index out of                                                

     range"},"request_id":"req_6e17865d08240f75f46bb4e3"}                       

     Retrying in 6 seconds… (attempt 5/10)      

Claude Model

Other

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.19

Claude Code Version

2.1.20

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗