Examples

Token Quota.Ppe

Token Quota.Ppe configuration for ..

Praxis AI v0.12.1 (alpha) 1 min read

Category: Practical
Task: Token Quota.Ppe configuration for ..

Prerequisites: The product runtime and any backend services referenced by this configuration.

Run it: Use ghcr.io/praxis-proxy/ai:0.12.1 and follow the container quickstart to mount and start the configuration.

This configuration comes from the selected release. The example has not been run here; external services are not bundled.

Download the source file.

plugins:
  - name: weighted-quota-v1
    kind: ai/token-quota
    hooks: [cmf.llm_output]
    capabilities: [metadata_only_response]
    mode: sequential
    on_error: fail
    config:
      formula_id: weighted-quota-v1
      unit: quota_units
      weights:
        input: 0.3333333333333333
        cached_input: 0.03333333333333333
        cache_write: 0.4166666666666667
        output: 1.0
        reasoning: 1.0

routes:
  - llm: "*"
    authorization:
      post_invocation:
        - "run(weighted-quota-v1)"