Skip to content

Add GroqCloud provider support#148

Open
00-Aakash-00 wants to merge 1 commit intovirattt:mainfrom
00-Aakash-00:adding-GroqCloud-Support
Open

Add GroqCloud provider support#148
00-Aakash-00 wants to merge 1 commit intovirattt:mainfrom
00-Aakash-00:adding-GroqCloud-Support

Conversation

@00-Aakash-00
Copy link

Summary

Adds GroqCloud as a first-class LLM provider option in Dexter (OpenAI-compatible Chat Completions), including provider routing, model selection UI entries, and env/docs updates.

Changes

Provider registry + routing

  • Added groq to the canonical provider registry (src/providers.ts) with:
    • modelPrefix: groq:
    • apiKeyEnvVar: GROQ_API_KEY
    • fastModel: groq:llama-3.1-8b-instant
  • Implemented GroqCloud model factory in src/model/llm.ts using LangChain's ChatOpenAI against Groq's OpenAI-compatible base URL (https://api.groq.com/openai/v1).
    • Stored model IDs keep the groq: prefix for routing; the prefix is stripped before sending to Groq (groq:llama-...llama-...).

CLI model selection

  • Added GroqCloud preset model entries in src/components/ModelSelector.tsx (prefixed with groq:) so users can select Groq models from the built-in list.
  • Updated model display-name normalization to also handle groq:-prefixed model IDs.

Environment + docs

  • Added GROQ_API_KEY to env.example.
  • Updated README.md prerequisites and .env example snippet to mention GroqCloud and the GROQ_API_KEY.
  • Updated AGENTS.md provider list / env var list to include GroqCloud and added build/lint commands for local workflows.

Tooling scripts

  • Added bun run build (bundles to dist/ with external packages) and bun run lint (alias to typecheck) in package.json.

How to test

  • bun run build
  • bun run lint
  • bun run typecheck
  • bun test

Notes

GroqCloud is wired via the OpenAI-compatible Chat Completions API (base URL https://api.groq.com/openai/v1), so it integrates cleanly via ChatOpenAI while keeping the provider routing model-prefix approach consistent with existing providers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant