From 73dadb573f92dca310036e8793932e94277abd62 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 11 Jun 2026 08:21:33 +0300 Subject: 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 --- internal/llm/openrouter.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'internal/llm/openrouter.go') 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{} -- cgit v1.2.3