can you add more llm providers? anthropic, gemini, bedrock, openrouter, grok, with the…
- User
can you add more llm providers? anthropic, gemini, bedrock, openrouter, grok, with the credentials they need
Assistant
I'll help you add more LLM providers. Let me first check what's currently in the llm-providers directory to understand the existing structure.
[tool: list_dir — Tool use: list_directory • Listed directory undefined • 0 results]
[tool: read_file — Tool use: read_file • Read file: /Users/[user]/Projects/superagents/src/types.ts]
[tool: read_file — Tool use: read_file • Read file: /Users/[user]/Projects/superagents/src/providers/llm-providers/openai/index.ts]
[tool: read_file — Tool use: read_file • Read file: /Users/[user]/Projects/superagents/src/providers/llm-providers/index.ts]
[tool: read_file — Tool use: read_file • Read file: /Users/[user]/Projects/superagents/src/config-collection/collect-config.ts]
Now I understand the structure. I'll add the new LLM providers. Let me create the provider files and update the necessary types and configuration collection logic.
[tool: write — Tool use: code_edit • Edit file: /Users/[user]/Projects/superagents/src/providers/llm-providers/anthropic/index.ts]
[tool: write — Tool use: code_edit • Edit file: /Users/[user]/Projects/superagents/src/providers/llm-providers/gemini/index.ts]
[tool: write — Tool use: code_edit • Edit file: /Users/[user]/Projects/superagents/src/providers/llm-providers/bedrock/index.ts]
[tool: write — Tool use: code_edit • Edit file: /Users/[user]/Projects/superagents/src/providers/llm-providers/openrouter/index.ts]
[tool: write — Tool use: code_edit • Edit file: /Users/[user]/Projects/superagents/src/providers/llm-providers/grok/index.ts]
Now I'll update the main llm-providers index to register all providers and support additional credentials:
[tool: search_replace — Tool use: code_edit • Edit file: /Users/[user]/Projects/superagents/src/providers/llm-providers/index.ts]
Now I need to update the OpenAI provider to match the new interface signature:
[tool: search_replace — Tool use: code_edit • Edit file: /Users/[user]/Projects/superagents/src/providers/llm-providers/openai/index.ts]
Now I'll update the types to include all the new providers and make the config more flexible:
[tool: search_replace — Tool use: code_edit • Edit file: /Users/[user]/Projects/superagents/src/types.ts]
Now I'll update the config collection to dynamically handle all LLM providers:
[tool: search_replace — Tool use: code_edit • Edit file: /Users/[user]/Projects/superagents/src/config-collection/collect-config.ts]
[tool: search_replace — Tool use: code_edit • Edit file: /Users/[user]/Projects/superagents/src/config-collection/collect-config.ts]
[tool: search_replace — Tool use: code_edit • Edit file: /Users/[user]/Projects/superagents/src/config-collection/collect-config.ts]
Now let me check where the API keys are used in the codebase and update those references:
- User
wait we shouldn't have
ifconditions here, the provider should know how to setup itself, maybe just define the keys it needs or something, execute a function if really needed Assistant
You're absolutely right! The provider should be responsible for defining what credentials it needs. Let me refactor this to have a more generic, extensible design where each provider declares its own credential requirements.
[tool: search_replace — Tool use: code_edit • Edit file: /Users/[user]/Projects/superagents/src/providers/llm-providers/index.ts]
- User
@commit.mdc
Assistant
I'll commit the files I just changed with a proper conventional commit message.
[tool: run_terminal_cmd — Tool use: command • Run command: cd /Users/[user]/Projects/superagents && git add src/providers/llm-providers/anthropic/index.ts src/providers/llm-providers/gemini/index.ts src/providers/llm-provider]
[tool: run_terminal_cmd — Tool use: command • Run command: cd /Users/[user]/Projects/superagents && git commit -m "feat: add support for multiple LLM providers (Anthropic, Gemini, Bedrock, OpenRouter, Grok) - Add new LLM prov]
Perfect! I've successfully committed all the changes. Here's what was done:
Summary of Changes
✅ Added 5 new LLM providers:
- Anthropic (Claude) -
ANTHROPIC_API_KEY - Google Gemini -
GOOGLE_API_KEY,
- Anthropic (Claude) -