From 005611f9972169a35aa59bf0e13b1cee7d10ea5a Mon Sep 17 00:00:00 2001 From: gautamrajur <33352257+gautamrajur@users.noreply.github.com> Date: Fri, 6 Mar 2026 09:51:21 -0500 Subject: [PATCH] Skip the prompt_cache_key parameter for GroqAPI's to allow Groq API's to work --- pkg/providers/openai_compat/provider.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/providers/openai_compat/provider.go b/pkg/providers/openai_compat/provider.go index ff9109e96..697e58a23 100644 --- a/pkg/providers/openai_compat/provider.go +++ b/pkg/providers/openai_compat/provider.go @@ -157,7 +157,8 @@ func (p *Provider) Chat( // Prompt caching is only supported by OpenAI-native endpoints. // Gemini and other providers reject unknown fields, so skip for non-OpenAI APIs. if cacheKey, ok := options["prompt_cache_key"].(string); ok && cacheKey != "" { - if !strings.Contains(p.apiBase, "generativelanguage.googleapis.com") { + if !strings.Contains(p.apiBase, "generativelanguage.googleapis.com") && + !strings.Contains(p.apiBase, "api.groq.com") { requestBody["prompt_cache_key"] = cacheKey } }