• YanzheL's avatar
    fix: extract and log Claude output_config.effort in usage records · 1bff2292
    YanzheL authored
    Claude's output_config.effort parameter (low/medium/high/max) was not
    being extracted from requests or logged in the reasoning_effort column
    of usage logs. Only the OpenAI path populated this field.
    
    Changes:
    - Extract output_config.effort in ParseGatewayRequest
    - Add ReasoningEffort field to ForwardResult
    - Populate reasoning_effort in both RecordUsage and RecordUsageWithLongContext
    - Guard against overwriting service-set effort values in handler
    - Update stale comments that described reasoning_effort as OpenAI-only
    - Add unit tests for extraction, normalization, and persistence
    1bff2292
gateway_service.go 279 KB