Skip to content

Conversation

@vigneshsubbiah16
Copy link

Overview

Adds Unbound as an alternative API provider alongside OpenRouter. Unbound is a secure AI gateway with cost controls, compliance features, and support for 60+ models.

Key Features

  • ✅ Single new file (backend/unbound.py)
  • ✅ 100% backward compatible (defaults to OpenRouter)
  • ✅ Auto-maps model names between providers
  • ✅ OpenRouter code completely untouched

Configuration

# .env - just add these two lines to use Unbound
API_PROVIDER=unbound
UNBOUND_API_KEY=your-key

No changes needed to COUNCIL_MODELS - model names are automatically mapped.

Changes

  • backend/unbound.py - New Unbound API client with model name mapping
  • backend/config.py - Add API_PROVIDER toggle and Unbound config
  • backend/council.py - Conditional import based on provider
  • .env.example - Document both provider options
  • README.md / CLAUDE.md - Updated documentation

Why Unbound?

  • Secure AI gateway with audit logs
  • Cost controls and usage limits
  • Compliance features (SOC2, HIPAA)
  • Works with 60+ models via single API
  • OpenAI-compatible interface

Testing

Tested with all 4 council models via Unbound:

  • openai/gpt-5.1
  • google/gemini-3-pro-preview
  • anthropic/claude-sonnet-4.5
  • x-ai/grok-4

Vignesh Subbiah added 2 commits December 11, 2025 10:10
- Add unbound.py API client for Unbound OpenAI-compatible API
- Update config.py with API_PROVIDER toggle (openrouter/unbound)
- Update council.py to dynamically import based on provider
- Add .env.example with both provider configurations
- Update README.md and CLAUDE.md with Unbound documentation
- Add test_unbound.py for testing all council models

Users can now choose between OpenRouter and Unbound by setting
API_PROVIDER environment variable. Both providers support the
same model identifiers.
Model names like anthropic/claude-sonnet-4.5 are now automatically
mapped to the Unbound format (claude-sonnet-4-5) at the API layer.
Users can use consistent OpenRouter-style model names regardless
of which provider they choose.
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