Skip to content

Tetrate Agent Router Service

Tetrate Agent Router Service provides enterprise-grade AI model routing and management services, focusing on security and scalability.

Supported Models

Tetrate Enterprise Models

  • tetrate-default - Default enterprise model
  • tetrate-premium - Premium enterprise model
  • tetrate-secure - Security-enhanced model

Routing Support

  • openai/ - OpenAI model series
  • anthropic/ - Anthropic model series
  • google/ - Google model series

Configuration

Basic Configuration

Configure in config.yaml or ~/.bytebuddy/config.yaml:

yaml
models:
  - name: "tetrate-router"
    provider: "tetrate_agent_router_service"
    model: "tetrate-default"
    apiKey: "${TETRATE_API_KEY}"
    apiBase: "https://api.tetrate.ai/v1"
    roles: ["chat", "edit"]
    defaultCompletionOptions:
      temperature: 0.7
      maxTokens: 4096

Multi-Model Configuration

yaml
models:
  - name: "tetrate-default"
    provider: "tetrate_agent_router_service"
    model: "tetrate-default"
    apiKey: "${TETRATE_API_KEY}"
    apiBase: "https://api.tetrate.ai/v1"
    roles: ["chat"]
    defaultCompletionOptions:
      temperature: 0.7
      maxTokens: 4096

  - name: "tetrate-secure"
    provider: "tetrate_agent_router_service"
    model: "tetrate-secure"
    apiKey: "${TETRATE_SECURE_KEY}"
    apiBase: "https://api.tetrate.ai/v1"
    roles: ["chat", "edit"]
    defaultCompletionOptions:
      temperature: 0.5
      maxTokens: 8192

Configuration Fields

Required Fields

  • name: Unique identifier for the model configuration
  • provider: Set to "tetrate_agent_router_service"
  • model: Model identifier
  • apiKey: Tetrate API key
  • apiBase: Tetrate API endpoint

Optional Fields

  • roles: Model roles [chat, edit, apply]
  • defaultCompletionOptions:
    • temperature: Control randomness (0-1)
    • maxTokens: Maximum tokens
    • topP: Nucleus sampling parameter
    • topK: Sampling candidates count
    • frequencyPenalty: Frequency penalty
    • presencePenalty: Presence penalty
  • requestOptions:
    • timeout: Request timeout (milliseconds)
    • verifySsl: Whether to verify SSL certificates

Environment Variables

bash
# ~/.bashrc or ~/.zshrc
export TETRATE_API_KEY="your-tetrate-api-key"
export TETRATE_SECURE_KEY="your-secure-api-key"

Getting API Key

  1. Visit Tetrate Website
  2. Register enterprise account
  3. Navigate to AI services console
  4. Generate API key
  5. Configure access permissions and quotas

Use Case Configurations

Enterprise Production Environment

yaml
models:
  - name: "prod-router"
    provider: "tetrate_agent_router_service"
    model: "tetrate-premium"
    apiKey: "${TETRATE_PROD_KEY}"
    apiBase: "https://api.tetrate.ai/v1"
    roles: ["chat", "edit", "apply"]
    defaultCompletionOptions:
      temperature: 0.3
      maxTokens: 8192
    requestOptions:
      timeout: 30000
      verifySsl: true

Development/Testing Environment

yaml
models:
  - name: "dev-router"
    provider: "tetrate_agent_router_service"
    model: "tetrate-default"
    apiKey: "${TETRATE_DEV_KEY}"
    apiBase: "https://dev.api.tetrate.ai/v1"
    roles: ["chat"]
    defaultCompletionOptions:
      temperature: 0.8
      maxTokens: 2048

Multi-Region Configuration

yaml
models:
  - name: "tetrate-us"
    provider: "tetrate_agent_router_service"
    model: "tetrate-default"
    apiKey: "${TETRATE_US_KEY}"
    apiBase: "https://us-west.api.tetrate.ai/v1"
    roles: ["chat"]

  - name: "tetrate-eu"
    provider: "tetrate_agent_router_service"
    model: "tetrate-default"
    apiKey: "${TETRATE_EU_KEY}"
    apiBase: "https://eu.api.tetrate.ai/v1"
    roles: ["chat"]

  - name: "tetrate-apac"
    provider: "tetrate_agent_router_service"
    model: "tetrate-default"
    apiKey: "${TETRATE_APAC_KEY}"
    apiBase: "https://apac.api.tetrate.ai/v1"
    roles: ["chat"]

Troubleshooting

Common Errors

  1. 401 Unauthorized: Invalid API key or insufficient permissions
  2. 403 Forbidden: Access denied, check access control settings
  3. 429 Too Many Requests: Rate limit reached
  4. 502 Bad Gateway: Gateway error, check endpoint configuration
  5. 504 Gateway Timeout: Request timeout

Debugging Steps

  1. Verify API key and permissions
  2. Check network connection and firewall
  3. View audit logs
  4. Monitor performance metrics
  5. Confirm endpoint URL is correct

Best Practices

1. Security

  • Use environment variables to store API keys
  • Enable audit logging
  • Rotate API keys regularly
  • Use encrypted connections
  • Implement access controls

2. Performance Optimization

  • Configure appropriate timeout values
  • Use caching to reduce latency
  • Enable load balancing
  • Choose nearest region
  • Implement request queuing

3. Cost Control

  • Monitor API usage
  • Set quota alerts
  • Choose models based on requirements
  • Optimize request frequency

4. Reliability

  • Implement retry logic
  • Configure failover
  • Monitor service health
  • Set reasonable timeouts
  • Log errors

Enterprise Features

Load Balancing

Tetrate provides intelligent routing and load balancing, automatically selecting the best available endpoint.

Access Control

Supports fine-grained access control based on IP, user, and time.

Audit Logging

Complete request tracking and audit logs to meet compliance requirements.

Data Residency

Supports multi-region deployment to meet data residency requirements.

SLA Guarantee

Enterprise-grade SLA guarantee with 99.9% uptime commitment.

Regional Endpoints

RegionEndpointLatency
US Westhttps://us-west.api.tetrate.ai/v1Low
US Easthttps://us-east.api.tetrate.ai/v1Low
Europehttps://eu.api.tetrate.ai/v1Medium
Asia Pacifichttps://apac.api.tetrate.ai/v1Medium