ai-gateway
AI Gateway Provider Switching Skill
Multi-provider AI configuration for Cloodle platform.
Trigger
- AI provider configuration
- Model switching requests
- API key setup
Supported Providers
Local (Ollama/LM Studio)
AI_PROVIDER=ollama
OLLAMA_BASE_URL=http://localhost:11434
OLLAMA_MODEL=llama3.2
Anthropic (Sonnet/Haiku)
AI_PROVIDER=anthropic
ANTHROPIC_API_KEY=sk-ant-...
ANTHROPIC_MODEL=claude-sonnet-4-20250514
HuggingFace (GPT-OSS)
AI_PROVIDER=huggingface
HF_API_KEY=hf_...
HF_MODEL=gpt-oss-20b
Provider Switching Logic
def get_llm():
provider = os.getenv("AI_PROVIDER", "ollama")
if provider == "ollama":
from langchain_ollama import ChatOllama
return ChatOllama(
base_url=os.getenv("OLLAMA_BASE_URL"),
model=os.getenv("OLLAMA_MODEL", "llama3.2")
)
elif provider == "anthropic":
from langchain_anthropic import ChatAnthropic
return ChatAnthropic(
model=os.getenv("ANTHROPIC_MODEL")
)
elif provider == "huggingface":
from langchain_huggingface import HuggingFaceEndpoint
return HuggingFaceEndpoint(
repo_id=os.getenv("HF_MODEL")
)
Model Recommendations
| Use Case | Provider | Model |
|---|---|---|
| Development | Ollama | llama3.2 |
| Production Chat | Anthropic | claude-sonnet |
| Cost Sensitive | HuggingFace | gpt-oss-20b |
| High Quality | Anthropic | claude-opus |
Environment File Location
/opt/cloodle/tools/ai/multi_agent_rag_system/.env
Test Provider
curl http://localhost:11434/api/tags # Ollama
More from astoeffer/plugin-marketplace
moodle-standards
Moodle coding standards with PSR-12 compliance and Frankenstyle naming. Use when developing Moodle plugins, writing PHP code for Moodle, or ensuring code quality compliance.
9psr12-moodle
Automatically validate and fix Moodle PHP code for PSR-12 compliance with Moodle-specific exceptions (lowercase_with_underscores naming, frankenstyle prefixes). Activates when working with Moodle plugin PHP files or when code standards issues are detected.
4h5p-patterns
Create interactive H5P content for Moodle and web platforms. Use when building interactive exercises, quizzes, or multimedia learning content.
2design-tokens
Manage design tokens for consistent theming across platforms. Use when defining colors, typography, spacing, or other design system values.
1chatbot-widget
Build embeddable chatbot widgets for web applications. Use when creating chat UIs, iframe embeds, or widget-based AI interfaces.
1plugin-structure
Claude Code plugin structure and requirements. Use when creating, validating, or troubleshooting plugins. Covers plugin.json schema, SKILL.md format, command frontmatter, and agent configuration.
1