A project that provides two ways to resolve free models for OpenCode:
- OpenCode Plugin - Dynamically fetches free models within OpenCode
- GitHub Action - Resolves free models for CI/CD pipelines
{
"$schema": "https://opencode.ai/config.json",
"plugin": [
"git@github.com:0xLLLLH/opencode-free-models.git"
]
}- uses: 0xLLLLH/opencode-free-models@mainKey Difference: GitHub Actions cannot use OpenCode plugins.
| Feature | OpenCode Plugin | GitHub Action |
|---|---|---|
| Environment | OpenCode | GitHub Actions |
| Configuration | OpenCode config file | YAML inputs |
| Dynamic resolution | Yes | Yes |
| Fallback support | Yes | Yes |
- Use Plugin: When working within OpenCode environment
- Use GitHub Action: When in CI/CD pipelines or need model resolution outside OpenCode
- Install via OpenCode plugin system
- Add to your OpenCode configuration
- Add to your GitHub Actions workflow
- Configure input parameters
alias: Custom alias for free models (default: "free-models")providers: List of providers to check (default: ["opencode"])fallbackModel: Fallback model when no free models availablepick: How to pick from free models — "first" (default) or "random"
providers: Comma-separated provider list (default: "opencode")fallback: Fallback model ID (default: "openrouter/free")pick: How to pick from free models — "first" (default) or "random"
model_id: Resolved model ID
{
"$schema": "https://opencode.ai/config.json",
"plugin": [
[
"git@github.com:0xLLLLH/opencode-free-models.git",
{
"providers": ["opencode"],
"alias": "free-models"
}
]
]
}- uses: 0xLLLLH/opencode-free-models@main
with:
providers: "opencode"
fallback: "openrouter/free"- OpenCode Plugin Documentation - Detailed plugin documentation
- GitHub Action Documentation - Detailed action documentation
- models.dev API - Model data source
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.