diff options
| author | Paul Buetow <paul@buetow.org> | 2026-06-11 08:21:33 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-06-11 08:21:33 +0300 |
| commit | 73dadb573f92dca310036e8793932e94277abd62 (patch) | |
| tree | f2def55cf07533400dda21babb759d077e7f899b /internal/llm/openrouter.go | |
| parent | 8135a6b851b420597c22cfa5e58e6d69e894a00d (diff) | |
llm: add compile-time interface checks for all providers
Add the missing var _ Client / var _ Streamer compile-time satisfaction
check to anthropicClient, and clarify the existing assertion comments for
openAIClient, openRouterClient, ollamaClient (all Client+Streamer) and
youSearchClient (Client only; the You.com research API is non-streaming).
All providers use value receivers, so assertions use zero-value structs.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'internal/llm/openrouter.go')
| -rw-r--r-- | internal/llm/openrouter.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/llm/openrouter.go b/internal/llm/openrouter.go index 970ec29..567a2c0 100644 --- a/internal/llm/openrouter.go +++ b/internal/llm/openrouter.go @@ -22,7 +22,8 @@ type openRouterClient struct { defaultTemperature *float64 } -// Ensure openRouterClient implements Client and Streamer. +// Ensure openRouterClient implements Client and Streamer. All of its methods +// use value receivers, so the assertions use a zero-value struct (not a pointer). var ( _ Client = openRouterClient{} _ Streamer = openRouterClient{} |
