Skip to content

fix: avoid stream retry panic on missing model config#343

Open
zerone0x wants to merge 1 commit into
plandex-ai:mainfrom
zerone0x:fix/339-streaming-retry-nil-base-config
Open

fix: avoid stream retry panic on missing model config#343
zerone0x wants to merge 1 commit into
plandex-ai:mainfrom
zerone0x:fix/339-streaming-retry-nil-base-config

Conversation

@zerone0x

@zerone0x zerone0x commented May 1, 2026

Copy link
Copy Markdown

Summary

Fixes #339.

When a streaming LLM call returns an overloaded/rate-limit error and the fallback result does not include a base model config, withStreamingRetries dereferenced fallbackRes.BaseModelConfig while classifying the error. That could turn the original provider error into a nil pointer panic.

This change treats a missing base model config as non-Claude-Max for classification, preserving the original retry/error handling path instead of panicking.

Test plan

  • PATH=/home/bobo/.local/go-toolchain/go/bin:$PATH go test ./model -run TestWithStreamingRetriesHandlesMissingBaseModelConfig -count=1
  • PATH=/home/bobo/.local/go-toolchain/go/bin:$PATH go test ./model
  • PATH=/home/bobo/.local/go-toolchain/go/bin:$PATH go test ./...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Client panics when LLM is overloaded, rather than retrying gracefully.

1 participant