Skip to content

ai/route/simulate - Traffic simulation command for adaptive routing testing #202

Closed as not planned

Description

@joelteply

Overview

Command for simulating traffic patterns to test adaptive routing logic before production deployment.

Key Features

  • Traffic patterns: steady, ramp, spike, custom
  • Warmup period: default 30s to stabilize routing before metrics collection
  • Variance constraints: 0-1 range (as % of RPS)
    • distributionType: 'gaussian' | 'uniform' (default: 'gaussian')
  • Function string support:
    • sine:amplitude=5,frequency=0.1
    • ramp:start=0,end=50
    • sawtooth:min=10,max=100,period=60
  • Custom intervals: per-interval model distribution override
  • Hysteresis config: integration with existing routing config
  • JSON output: compatible with pipe/chain → ai/cost

Example Usage

ai/route/simulate duration=60 requestsPerSecond=10 warmup=30 modelPool='["gpt-4","claude-3-opus"]' | pipe/chain commands='[{"name":"ai/cost","params":{"groupBy":"model"}}]'

Implementation Notes

  • Output format must be compatible with existing cost analysis tools
  • Variance should prevent unrealistic traffic patterns
  • Function strings provide flexible pattern generation without code changes

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions