tokenfirewall icon indicating copy to clipboard operation
tokenfirewall copied to clipboard

Enhancement: Add Groq API Support to Provider Adapters

Open Xploit-Ghost opened this issue 6 months ago • 0 comments

Description

TokenFirewall currently supports major providers like OpenAI and Gemini. However, as developers increasingly adopt high-speed inference engines like Groq for specific routing fallbacks, adding native support for Groq would significantly enhance the middleware's flexibility and multi-provider capabilities.

Proposed Solution

  1. Create a new GroqAdapter class in the adapters directory that implements the standard provider interface.
  2. Map Groq's API request/response structures (which are largely OpenAI-compatible) to the internal TokenFirewall data format.
  3. Add Groq pricing logic to the token counting and budget enforcement modules.
  4. Update the README.md to include an example of initializing the firewall with a Groq API key.

GSSoC '26 Request

Hi maintainers! 👋 I am actively participating in GirlScript Summer of Code 2026 and would love to build this feature.

Could you please:

  1. Assign this issue to me.
  2. Add the gssoc26, enhancement, and hacktoberfest (if applicable) labels to this issue

Thank you! I am ready with the solution and I look forward to contributing.

Xploit-Ghost avatar May 29 '26 14:05 Xploit-Ghost