Files
go-llm/v2/request_test.go
Steve Dudenhoeffer 01b18dcf32 test(v2): cover empty-messages and disabled-but-non-nil cacheConfig edges
Adds two boundary tests suggested by code review:
- TestBuildProviderRequest_CachingEnabled_EmptyMessages: verifies
  that caching with an empty message list still emits a CacheHints
  with LastCacheableMessageIndex=-1, not a spurious breakpoint.
- TestBuildProviderRequest_CachingNonNilButDisabled: verifies that
  an explicitly-disabled cacheConfig (non-nil, enabled=false)
  produces nil CacheHints, exercising the &&-guard branch that
  the previous "disabled" test left untested.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 19:24:55 +00:00

7.7 KiB