Skip to content

feat: add DB-backed model registry - #203

Merged
Gajesh2007 merged 12 commits into
masterfrom
model-registry
May 24, 2026
Merged

Gajesh2007 merged 12 commits into
masterfrom
model-registry

Conversation

@Gajesh2007

@Gajesh2007 Gajesh2007 commented May 23, 2026 •

Copy link
Copy Markdown
Member

Summary

This PR replaces the hardcoded model catalog with a DB-backed, versioned model registry backed by R2 manifests.

  • Adds model registry tables, store methods, public catalog/manifest endpoints, and publishing-key protected register/promote/status endpoints.
  • Adds darkbloom-publish hash for Linux/GCP model manifest generation.
  • Adds scripts/publish-model.sh for uploading local Hugging Face snapshots to darkbloom-models and .github/workflows/register-model.yml for registering those manifests with the coordinator.
  • Updates the Swift provider to download from https://models.darkbloom.ai, fetch manifests, download files with bounded 8-way parallelism, and verify per-file + aggregate SHA-256.
  • Removes legacy startup seeding of the five hardcoded models and cleans up console/docs hardcoded catalog usage.

Before

flowchart LR
  subgraph Before["Before: hardcoded registry + manual R2"]
    A["Coordinator startup"] --> B["seedModelCatalog hardcodes 5 models"]
    B --> C["supported_models table"]
    C --> D["/v1/models/catalog"]
    E["Rust provider fallback catalog"] -. drift .-> D
    F["Console UI hardcoded copies"] -. drift .-> D
    G["Manual out-of-band R2 upload"] --> H["pub-r2.dev/{s3_name}/files"]
    D --> I["Provider downloads fixed file list"]
    H --> I
    I --> J["Sequential downloads; limited hash coverage"]
  end
Loading

After

flowchart LR
  subgraph Publish["Publish path"]
    A["GCP VM with local HuggingFace snapshot"] --> B["darkbloom-publish hash"]
    B --> C["manifest.json: files, sizes, SHA-256, aggregate"]
    B --> D["scripts/publish-model.sh"]
    D --> E["R2 darkbloom-models via AWS CLI"]
    C --> E
    E --> F["models.darkbloom.ai/v2/{model-slug--hash}/{version}"]
  end

  subgraph Register["Registration path"]
    G["GitHub workflow: register-model.yml"] --> H["POST /v1/admin/models/register"]
    H --> I["Dedicated publishing API key auth"]
    H --> J["Coordinator fetches manifest"]
    J --> K["Parallel HEAD verification"]
    K --> L["Postgres model_registry + versions + files"]
    H --> M{"promote?"}
    M -->|yes| N["model_active_versions"]
  end

  subgraph Serve["Runtime path"]
    L --> O["/v1/models/catalog"]
    N --> O
    O --> P["Swift provider fetches manifest"]
    F --> Q["8-way parallel downloads"]
    P --> Q
    Q --> R["Per-file SHA-256 + aggregate verification"]
    R --> S["Provider serves active model"]
  end
Loading

Validation

  • go test ./coordinator/...
  • cd provider-swift && swift build --product darkbloom-publish
  • cd provider-swift && swift test --filter ProviderCoreFoundationTests
  • cd provider-swift && swift test --filter ModelCatalogTests
  • cd provider-swift && swift build
  • bash -n scripts/publish-model.sh
  • cd console-ui && npm ci && npx eslint src/ && npm run build (0 errors, existing warnings)
  • Rendered both Mermaid diagrams locally with @mermaid-js/mermaid-cli.

Local Hugging Face smoke tests:

  • models--gpt2: aggregate 4aba3d1525bd4ca23759e1f679356dc80112396ffa15121c82a0a1b52bc023e9
  • mlx-community/gemma-4-26b-a4b-it-8bit: 13 files, 27,986,040,506 bytes, aggregate a4722b6020adb1894c700b45ddcd58bc0e0f033abe7139f86cbbbfe60cba4eb6, R2 prefix v2/mlx-community-gemma-4-26b-a4b-it-8bit--a69615027fc1/local-gemma4-26b-8bit

Known note: full swift test still hits the pre-existing MLX metallib error after non-MLX tests pass.

Model Registration Fields

Required workflow inputs:

  • model_id
  • version
  • display_name
  • quantization
  • max_context_length
  • max_output_length
  • min_ram_gb

Optional metadata inputs:

  • family
  • architecture
  • capabilities_csv
  • description
  • metadata_json
  • runtime_parameters_json
  • promote
  • coordinator_url

Removed from the registration contract: recommended_ram_gb, source_hf_id, and source_hf_revision.

Required Secrets / Env

Coordinator:

  • MODEL_REGISTRY_CDN_BASE_URL optional, defaults to https://models.darkbloom.ai
  • MODEL_REGISTRY_PUBLISHING_KEY bootstrap publishing key

GitHub Actions:

  • MODEL_REGISTRY_PUBLISHING_KEY

GCP publish VM:

  • GCP_PROJECT
  • R2_ACCOUNT_ID
  • R2_BUCKET, defaults to darkbloom-models
  • R2_ACCESS_KEY_SECRET, defaults to darkbloom-r2-access-key-id
  • R2_SECRET_KEY_SECRET, defaults to darkbloom-r2-secret-access-key

@vercel

vercel Bot commented May 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
d-inference Ready Ready Preview May 24, 2026 6:55pm
d-inference-console-ui-dev Ready Ready Preview May 24, 2026 6:55pm
d-inference-landing Ready Ready Preview May 24, 2026 6:55pm

Request Review

@github-actions

github-actions Bot commented May 23, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark Results

Runner: macos-15 (M1 Virtual) | Date: 2026-05-23 22:58 UTC

1-provider-streaming

1 providers, 1 users, 30 requests, concurrency=5, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 30
Success 4
Errors 26
Total Duration 3.88s
Throughput 1.0 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 1.761s 1.761s 1.761s 1.761s
parse 4 40µs 44µs 68µs 68µs
reserve 4 6ms 7ms 8ms 8ms
route 4 32µs 34µs 57µs 57µs
encrypt 4 754µs 776µs 873µs 873µs
dispatch 4 56µs 58µs 86µs 86µs
coordinator_to_provider 4 1.749s 1.749s 1.752s 1.752s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=40µs (threshold=1ms)
parse:p95<=5ms PASS p95=68µs (threshold=5ms)
reserve:mean<=50ms PASS mean=5.66175ms (threshold=50ms)
reserve:p95<=200ms PASS p95=7.859ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=753.75µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=873µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=56.25µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=86µs (threshold=50ms)

1-provider-non-streaming

1 providers, 1 users, 20 requests, concurrency=5, streaming=false

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 20
Success 4
Errors 16
Total Duration 2.4s
Throughput 1.7 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 2.397s 2.398s 2.4s 2.4s
parse 4 48µs 49µs 81µs 81µs
reserve 4 9ms 9ms 12ms 12ms
route 4 26µs 35µs 50µs 50µs
encrypt 4 610µs 672µs 761µs 761µs
dispatch 4 63µs 69µs 81µs 81µs
coordinator_to_provider 4 1.796s 1.796s 1.799s 1.799s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=47.75µs (threshold=1ms)
parse:p95<=5ms PASS p95=81µs (threshold=5ms)
reserve:mean<=50ms PASS mean=8.8615ms (threshold=50ms)
reserve:p95<=200ms PASS p95=12.055ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=609.75µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=761µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=63.25µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=81µs (threshold=50ms)

7-provider-multi-model

7 providers, 5 users, 50 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 4 0.5 GB
mlx-community/gemma-3-270m-4bit 3 0.2 GB
Metric Value
Total Requests 50
Success 43
Errors 7
Total Duration 8.626s
Throughput 5.0 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 43 637ms 3ms 3.281s 3.308s
parse 42 20µs 17µs 31µs 66µs
reserve 42 2ms 1ms 6ms 7ms
route 42 21µs 20µs 34µs 40µs
encrypt 43 405µs 352µs 673µs 825µs
dispatch 43 36µs 25µs 94µs 146µs
coordinator_to_provider 43 573ms 1ms 3.267s 3.294s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=19.595µs (threshold=1ms)
parse:p95<=5ms PASS p95=31µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.746ms (threshold=50ms)
reserve:p95<=200ms PASS p95=5.747ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=404.813µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=673µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=36.418µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=94µs (threshold=50ms)

3-provider-high-concurrency

3 providers, 10 users, 60 requests, concurrency=20, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 60
Success 12
Errors 48
Total Duration 3.493s
Throughput 3.4 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 12 2.186s 2.182s 2.198s 2.198s
parse 12 14µs 12µs 39µs 39µs
reserve 12 2ms 2ms 3ms 3ms
route 12 17µs 16µs 32µs 32µs
encrypt 12 1ms 1ms 1ms 1ms
dispatch 12 28µs 28µs 47µs 47µs
coordinator_to_provider 12 2.179s 2.175s 2.192s 2.192s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=14.083µs (threshold=1ms)
parse:p95<=5ms PASS p95=39µs (threshold=5ms)
reserve:mean<=50ms PASS mean=2.245666ms (threshold=50ms)
reserve:p95<=200ms PASS p95=3.303ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=572.916µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=1.009ms (threshold=50ms)
dispatch:mean<=5ms PASS mean=28.25µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=47µs (threshold=50ms)

1-provider-queue-saturation

1 providers, 10 users, 40 requests, concurrency=15, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 40
Success 4
Errors 36
Total Duration 3.663s
Throughput 1.1 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 2.279s 2.279s 2.279s 2.279s
parse 4 18µs 20µs 35µs 35µs
reserve 4 2ms 2ms 2ms 2ms
route 4 13µs 13µs 23µs 23µs
encrypt 4 457µs 452µs 592µs 592µs
dispatch 4 28µs 28µs 46µs 46µs
coordinator_to_provider 4 2.272s 2.273s 2.273s 2.273s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=18.25µs (threshold=1ms)
parse:p95<=5ms PASS p95=35µs (threshold=5ms)
reserve:mean<=50ms PASS mean=2.129ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.32ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=456.75µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=592µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=27.75µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=46µs (threshold=50ms)

3-provider-20-users

3 providers, 20 users, 60 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 60
Success 60
Errors 0
Total Duration 5.766s
Throughput 10.4 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 60 371ms 5ms 2.216s 2.216s
parse 60 18µs 16µs 33µs 47µs
reserve 60 1ms 1ms 3ms 4ms
route 60 21µs 17µs 49µs 145µs
encrypt 60 0s 0s 1ms 1ms
dispatch 60 32µs 26µs 77µs 120µs
coordinator_to_provider 60 368ms 2ms 2.206s 2.212s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=18.483µs (threshold=1ms)
parse:p95<=5ms PASS p95=33µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.4167ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.646ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=451.366µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=934µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=31.866µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=77µs (threshold=50ms)

1-provider-scaling

1 providers, 5 users, 30 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 30
Success 4
Errors 26
Total Duration 3.21s
Throughput 1.2 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 2.137s 2.137s 2.137s 2.137s
parse 4 17µs 19µs 23µs 23µs
reserve 4 2ms 2ms 2ms 2ms
route 4 17µs 12µs 31µs 31µs
encrypt 4 517µs 492µs 797µs 797µs
dispatch 4 32µs 34µs 48µs 48µs
coordinator_to_provider 4 2.131s 2.131s 2.131s 2.131s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=16.5µs (threshold=1ms)
parse:p95<=5ms PASS p95=23µs (threshold=5ms)
reserve:mean<=50ms PASS mean=2.0765ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.348ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=516.75µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=797µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=31.5µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=48µs (threshold=50ms)

3-provider-scaling

3 providers, 5 users, 30 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 30
Success 30
Errors 0
Total Duration 3.973s
Throughput 7.6 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 30 745ms 6ms 2.231s 2.231s
parse 30 20µs 16µs 57µs 60µs
reserve 30 2ms 1ms 6ms 8ms
route 30 22µs 15µs 90µs 165µs
encrypt 30 372µs 336µs 664µs 675µs
dispatch 30 32µs 26µs 112µs 117µs
coordinator_to_provider 30 740ms 3ms 2.224s 2.225s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=20.3µs (threshold=1ms)
parse:p95<=5ms PASS p95=57µs (threshold=5ms)
reserve:mean<=50ms PASS mean=2.047066ms (threshold=50ms)
reserve:p95<=200ms PASS p95=6.101ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=371.9µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=664µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=31.533µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=112µs (threshold=50ms)

5-provider-scaling

5 providers, 5 users, 30 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 5 0.5 GB
Metric Value
Total Requests 30
Success 30
Errors 0
Total Duration 3.923s
Throughput 7.6 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 30 753ms 4ms 2.291s 2.294s
parse 30 22µs 17µs 51µs 86µs
reserve 30 2ms 1ms 7ms 8ms
route 30 23µs 19µs 56µs 59µs
encrypt 30 0s 0s 1ms 1ms
dispatch 30 37µs 25µs 118µs 146µs
coordinator_to_provider 30 745ms 1ms 2.271s 2.274s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=21.9µs (threshold=1ms)
parse:p95<=5ms PASS p95=51µs (threshold=5ms)
reserve:mean<=50ms PASS mean=2.200866ms (threshold=50ms)
reserve:p95<=200ms PASS p95=7.116ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=496.3µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=999µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=36.6µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=118µs (threshold=50ms)

3-provider-heavy-100conc-10kb

3 providers, 20 users, 100 requests, concurrency=100, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 100
Success 12
Errors 88
Total Duration 3.313s
Throughput 3.6 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 12 2.146s 2.157s 2.161s 2.161s
parse 12 75µs 75µs 90µs 90µs
reserve 12 7ms 6ms 7ms 7ms
route 12 13µs 14µs 26µs 26µs
encrypt 12 16ms 16ms 17ms 17ms
dispatch 12 41µs 38µs 65µs 65µs
coordinator_to_provider 12 2.113s 2.124s 2.129s 2.129s

Assertion Report: FAIL

Assertion Result Detail
parse:mean<=1ms PASS mean=74.5µs (threshold=1ms)
parse:p95<=5ms PASS p95=90µs (threshold=5ms)
reserve:mean<=50ms PASS mean=6.510416ms (threshold=50ms)
reserve:p95<=200ms PASS p95=7.003ms (threshold=200ms)
encrypt:mean<=5ms FAIL mean=16.426583ms (threshold=5ms)
encrypt:p95<=50ms PASS p95=16.905ms (threshold=50ms)
dispatch:mean<=5ms PASS mean=40.666µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=65µs (threshold=50ms)

@github-actions

github-actions Bot commented May 23, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark Results

Runner: macos-15 (M1 Virtual) | Date: 2026-05-23 23:35 UTC

1-provider-streaming

1 providers, 1 users, 30 requests, concurrency=5, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 30
Success 4
Errors 26
Total Duration 3.943s
Throughput 1.0 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 1.789s 1.789s 1.789s 1.789s
parse 4 27µs 42µs 48µs 48µs
reserve 4 3ms 3ms 4ms 4ms
route 4 13µs 15µs 15µs 15µs
encrypt 4 342µs 368µs 395µs 395µs
dispatch 4 21µs 23µs 25µs 25µs
coordinator_to_provider 4 1.783s 1.784s 1.785s 1.785s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=27µs (threshold=1ms)
parse:p95<=5ms PASS p95=48µs (threshold=5ms)
reserve:mean<=50ms PASS mean=2.633ms (threshold=50ms)
reserve:p95<=200ms PASS p95=3.813ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=342.25µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=395µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=21.25µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=25µs (threshold=50ms)

1-provider-non-streaming

1 providers, 1 users, 20 requests, concurrency=5, streaming=false

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 20
Success 4
Errors 16
Total Duration 2.289s
Throughput 1.7 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 2.286s 2.287s 2.288s 2.288s
parse 4 28µs 23µs 51µs 51µs
reserve 4 6ms 7ms 9ms 9ms
route 4 26µs 28µs 34µs 34µs
encrypt 4 697µs 724µs 822µs 822µs
dispatch 4 38µs 39µs 51µs 51µs
coordinator_to_provider 4 1.706s 1.707s 1.709s 1.709s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=27.75µs (threshold=1ms)
parse:p95<=5ms PASS p95=51µs (threshold=5ms)
reserve:mean<=50ms PASS mean=6.2995ms (threshold=50ms)
reserve:p95<=200ms PASS p95=8.854ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=697µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=822µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=38µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=51µs (threshold=50ms)

7-provider-multi-model

7 providers, 5 users, 50 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 4 0.5 GB
mlx-community/gemma-3-270m-4bit 3 0.2 GB
Metric Value
Total Requests 50
Success 43
Errors 7
Total Duration 8.519s
Throughput 5.0 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 43 633ms 3ms 3.299s 3.31s
parse 42 19µs 15µs 37µs 64µs
reserve 42 1ms 1ms 3ms 4ms
route 42 22µs 18µs 51µs 86µs
encrypt 43 398µs 378µs 636µs 764µs
dispatch 43 34µs 30µs 68µs 155µs
coordinator_to_provider 43 571ms 1ms 3.29s 3.303s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=19.309µs (threshold=1ms)
parse:p95<=5ms PASS p95=37µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.385238ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.761ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=397.837µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=636µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=33.534µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=68µs (threshold=50ms)

3-provider-high-concurrency

3 providers, 10 users, 60 requests, concurrency=20, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 60
Success 12
Errors 48
Total Duration 3.427s
Throughput 3.5 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 12 2.162s 2.15s 2.194s 2.194s
parse 12 16µs 17µs 24µs 24µs
reserve 12 3ms 3ms 4ms 4ms
route 12 14µs 13µs 43µs 43µs
encrypt 12 576µs 600µs 812µs 812µs
dispatch 12 25µs 19µs 73µs 73µs
coordinator_to_provider 12 2.154s 2.143s 2.187s 2.187s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=15.666µs (threshold=1ms)
parse:p95<=5ms PASS p95=24µs (threshold=5ms)
reserve:mean<=50ms PASS mean=2.648416ms (threshold=50ms)
reserve:p95<=200ms PASS p95=3.621ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=575.75µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=812µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=24.583µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=73µs (threshold=50ms)

1-provider-queue-saturation

1 providers, 10 users, 40 requests, concurrency=15, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 40
Success 4
Errors 36
Total Duration 3.158s
Throughput 1.3 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 2.07s 2.071s 2.071s 2.071s
parse 4 21µs 23µs 28µs 28µs
reserve 4 2ms 2ms 2ms 2ms
route 4 24µs 33µs 39µs 39µs
encrypt 4 496µs 577µs 603µs 603µs
dispatch 4 21µs 23µs 28µs 28µs
coordinator_to_provider 4 2.065s 2.065s 2.065s 2.065s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=20.5µs (threshold=1ms)
parse:p95<=5ms PASS p95=28µs (threshold=5ms)
reserve:mean<=50ms PASS mean=2.18475ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.233ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=495.75µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=603µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=21µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=28µs (threshold=50ms)

3-provider-20-users

3 providers, 20 users, 60 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 60
Success 60
Errors 0
Total Duration 5.337s
Throughput 11.2 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 60 399ms 4ms 2.397s 2.397s
parse 60 17µs 16µs 30µs 32µs
reserve 60 1ms 1ms 2ms 2ms
route 60 16µs 13µs 31µs 50µs
encrypt 60 358µs 338µs 661µs 703µs
dispatch 60 31µs 26µs 67µs 100µs
coordinator_to_provider 60 396ms 1ms 2.391s 2.393s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=17.083µs (threshold=1ms)
parse:p95<=5ms PASS p95=30µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.145783ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.028ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=358.2µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=661µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=31.366µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=67µs (threshold=50ms)

1-provider-scaling

1 providers, 5 users, 30 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 30
Success 4
Errors 26
Total Duration 3.088s
Throughput 1.3 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 2.063s 2.063s 2.063s 2.063s
parse 4 20µs 19µs 34µs 34µs
reserve 4 3ms 4ms 4ms 4ms
route 4 17µs 15µs 30µs 30µs
encrypt 4 434µs 376µs 697µs 697µs
dispatch 4 32µs 27µs 58µs 58µs
coordinator_to_provider 4 2.057s 2.058s 2.059s 2.059s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=20.25µs (threshold=1ms)
parse:p95<=5ms PASS p95=34µs (threshold=5ms)
reserve:mean<=50ms PASS mean=2.9445ms (threshold=50ms)
reserve:p95<=200ms PASS p95=4.135ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=434µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=697µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=32µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=58µs (threshold=50ms)

3-provider-scaling

3 providers, 5 users, 30 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 30
Success 30
Errors 0
Total Duration 4.038s
Throughput 7.4 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 30 683ms 8ms 2.057s 2.058s
parse 30 16µs 14µs 34µs 38µs
reserve 30 2ms 1ms 3ms 3ms
route 30 11µs 10µs 20µs 23µs
encrypt 30 395µs 369µs 613µs 726µs
dispatch 30 23µs 19µs 56µs 68µs
coordinator_to_provider 30 679ms 5ms 2.051s 2.052s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=15.966µs (threshold=1ms)
parse:p95<=5ms PASS p95=34µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.609633ms (threshold=50ms)
reserve:p95<=200ms PASS p95=3.124ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=394.933µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=613µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=23.033µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=56µs (threshold=50ms)

5-provider-scaling

5 providers, 5 users, 30 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 5 0.5 GB
Metric Value
Total Requests 30
Success 30
Errors 0
Total Duration 4.101s
Throughput 7.3 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 30 782ms 4ms 2.372s 2.373s
parse 30 17µs 16µs 35µs 38µs
reserve 30 2ms 1ms 3ms 4ms
route 30 19µs 17µs 39µs 99µs
encrypt 30 429µs 360µs 727µs 887µs
dispatch 30 27µs 25µs 57µs 77µs
coordinator_to_provider 30 778ms 1ms 2.364s 2.368s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=16.8µs (threshold=1ms)
parse:p95<=5ms PASS p95=35µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.548833ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.68ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=429.466µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=727µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=26.9µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=57µs (threshold=50ms)

3-provider-heavy-100conc-10kb

3 providers, 20 users, 100 requests, concurrency=100, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 100
Success 12
Errors 88
Total Duration 3.208s
Throughput 3.7 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 12 2.187s 2.184s 2.199s 2.199s
parse 12 76µs 67µs 130µs 130µs
reserve 12 8ms 8ms 9ms 9ms
route 12 21µs 17µs 46µs 46µs
encrypt 12 21ms 21ms 21ms 21ms
dispatch 12 66µs 39µs 242µs 242µs
coordinator_to_provider 12 2.148s 2.146s 2.16s 2.16s

Assertion Report: FAIL

Assertion Result Detail
parse:mean<=1ms PASS mean=76µs (threshold=1ms)
parse:p95<=5ms PASS p95=130µs (threshold=5ms)
reserve:mean<=50ms PASS mean=7.59275ms (threshold=50ms)
reserve:p95<=200ms PASS p95=8.813ms (threshold=200ms)
encrypt:mean<=5ms FAIL mean=20.664333ms (threshold=5ms)
encrypt:p95<=50ms PASS p95=21.157ms (threshold=50ms)
dispatch:mean<=5ms PASS mean=66.25µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=242µs (threshold=50ms)

…ntain permissions'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@github-actions

github-actions Bot commented May 23, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark Results

Runner: macos-15 (M1 Virtual) | Date: 2026-05-23 23:44 UTC

1-provider-streaming

1 providers, 1 users, 30 requests, concurrency=5, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 30
Success 4
Errors 26
Total Duration 3.908s
Throughput 1.0 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 1.817s 1.817s 1.817s 1.817s
parse 4 41µs 56µs 59µs 59µs
reserve 4 4ms 5ms 6ms 6ms
route 4 19µs 17µs 23µs 23µs
encrypt 4 510µs 545µs 553µs 553µs
dispatch 4 32µs 33µs 40µs 40µs
coordinator_to_provider 4 1.807s 1.807s 1.809s 1.809s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=40.5µs (threshold=1ms)
parse:p95<=5ms PASS p95=59µs (threshold=5ms)
reserve:mean<=50ms PASS mean=4.0355ms (threshold=50ms)
reserve:p95<=200ms PASS p95=5.776ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=509.75µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=553µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=32.25µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=40µs (threshold=50ms)

1-provider-non-streaming

1 providers, 1 users, 20 requests, concurrency=5, streaming=false

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 20
Success 4
Errors 16
Total Duration 2.607s
Throughput 1.5 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 2.604s 2.605s 2.607s 2.607s
parse 4 24µs 26µs 27µs 27µs
reserve 4 3ms 4ms 5ms 5ms
route 4 18µs 21µs 23µs 23µs
encrypt 4 503µs 539µs 591µs 591µs
dispatch 4 32µs 34µs 47µs 47µs
coordinator_to_provider 4 1.866s 1.867s 1.868s 1.868s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=24µs (threshold=1ms)
parse:p95<=5ms PASS p95=27µs (threshold=5ms)
reserve:mean<=50ms PASS mean=3.432ms (threshold=50ms)
reserve:p95<=200ms PASS p95=5.263ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=503µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=591µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=32.25µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=47µs (threshold=50ms)

7-provider-multi-model

7 providers, 5 users, 50 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 4 0.5 GB
mlx-community/gemma-3-270m-4bit 3 0.2 GB
Metric Value
Total Requests 50
Success 43
Errors 7
Total Duration 8.462s
Throughput 5.1 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 43 644ms 3ms 3.328s 3.359s
parse 41 22µs 15µs 56µs 90µs
reserve 41 2ms 1ms 5ms 7ms
route 41 24µs 19µs 51µs 81µs
encrypt 43 433µs 337µs 801µs 950µs
dispatch 43 39µs 28µs 107µs 206µs
coordinator_to_provider 43 522ms 1ms 3.315s 3.345s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=22.487µs (threshold=1ms)
parse:p95<=5ms PASS p95=56µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.662731ms (threshold=50ms)
reserve:p95<=200ms PASS p95=5.066ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=433.325µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=801µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=38.813µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=107µs (threshold=50ms)

3-provider-high-concurrency

3 providers, 10 users, 60 requests, concurrency=20, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 60
Success 12
Errors 48
Total Duration 3.706s
Throughput 3.2 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 12 2.172s 2.182s 2.196s 2.196s
parse 12 16µs 14µs 43µs 43µs
reserve 12 3ms 3ms 5ms 5ms
route 12 20µs 15µs 63µs 63µs
encrypt 12 1ms 1ms 3ms 3ms
dispatch 12 24µs 25µs 40µs 40µs
coordinator_to_provider 12 2.163s 2.173s 2.189s 2.189s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=16.416µs (threshold=1ms)
parse:p95<=5ms PASS p95=43µs (threshold=5ms)
reserve:mean<=50ms PASS mean=2.90725ms (threshold=50ms)
reserve:p95<=200ms PASS p95=4.983ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=1.05225ms (threshold=5ms)
encrypt:p95<=50ms PASS p95=3.424ms (threshold=50ms)
dispatch:mean<=5ms PASS mean=24.416µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=40µs (threshold=50ms)

1-provider-queue-saturation

1 providers, 10 users, 40 requests, concurrency=15, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 40
Success 4
Errors 36
Total Duration 3.152s
Throughput 1.3 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 2.174s 2.174s 2.174s 2.174s
parse 4 19µs 19µs 31µs 31µs
reserve 4 2ms 2ms 2ms 2ms
route 4 12µs 13µs 17µs 17µs
encrypt 4 554µs 485µs 788µs 788µs
dispatch 4 25µs 24µs 33µs 33µs
coordinator_to_provider 4 2.169s 2.169s 2.17s 2.17s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=19µs (threshold=1ms)
parse:p95<=5ms PASS p95=31µs (threshold=5ms)
reserve:mean<=50ms PASS mean=2.09175ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.368ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=554µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=788µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=25.25µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=33µs (threshold=50ms)

3-provider-20-users

3 providers, 20 users, 60 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 60
Success 60
Errors 0
Total Duration 5.765s
Throughput 10.4 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 60 397ms 5ms 2.364s 2.364s
parse 60 17µs 14µs 33µs 56µs
reserve 60 1ms 1ms 3ms 3ms
route 60 16µs 13µs 30µs 88µs
encrypt 60 405µs 374µs 672µs 836µs
dispatch 60 29µs 24µs 73µs 99µs
coordinator_to_provider 60 394ms 3ms 2.356s 2.358s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=16.883µs (threshold=1ms)
parse:p95<=5ms PASS p95=33µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.289133ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.661ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=404.733µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=672µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=28.933µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=73µs (threshold=50ms)

1-provider-scaling

1 providers, 5 users, 30 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 30
Success 4
Errors 26
Total Duration 2.855s
Throughput 1.4 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 2.064s 2.064s 2.064s 2.064s
parse 4 22µs 20µs 37µs 37µs
reserve 4 2ms 2ms 2ms 2ms
route 4 68µs 17µs 227µs 227µs
encrypt 4 629µs 694µs 761µs 761µs
dispatch 4 26µs 22µs 44µs 44µs
coordinator_to_provider 4 2.059s 2.059s 2.06s 2.06s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=22µs (threshold=1ms)
parse:p95<=5ms PASS p95=37µs (threshold=5ms)
reserve:mean<=50ms PASS mean=2.06375ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.367ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=628.75µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=761µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=25.5µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=44µs (threshold=50ms)

3-provider-scaling

3 providers, 5 users, 30 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 30
Success 21
Errors 9
Total Duration 3.625s
Throughput 5.8 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 21 1.015s 10ms 2.134s 2.134s
parse 21 20µs 17µs 37µs 43µs
reserve 21 2ms 2ms 3ms 4ms
route 21 20µs 16µs 50µs 77µs
encrypt 21 409µs 381µs 630µs 677µs
dispatch 21 29µs 23µs 52µs 68µs
coordinator_to_provider 21 1.01s 6ms 2.128s 2.128s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=20.428µs (threshold=1ms)
parse:p95<=5ms PASS p95=37µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.867571ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.809ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=408.571µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=630µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=28.619µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=52µs (threshold=50ms)

5-provider-scaling

5 providers, 5 users, 30 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 5 0.5 GB
Metric Value
Total Requests 30
Success 30
Errors 0
Total Duration 3.755s
Throughput 8.0 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 30 653ms 4ms 1.987s 1.987s
parse 30 20µs 16µs 46µs 53µs
reserve 30 2ms 1ms 5ms 6ms
route 30 20µs 16µs 39µs 44µs
encrypt 30 443µs 448µs 688µs 730µs
dispatch 30 36µs 29µs 122µs 143µs
coordinator_to_provider 30 647ms 1ms 1.972s 1.977s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=20.066µs (threshold=1ms)
parse:p95<=5ms PASS p95=46µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.9067ms (threshold=50ms)
reserve:p95<=200ms PASS p95=4.896ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=442.533µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=688µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=36.4µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=122µs (threshold=50ms)

3-provider-heavy-100conc-10kb

3 providers, 20 users, 100 requests, concurrency=100, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 100
Success 12
Errors 88
Total Duration 3.195s
Throughput 3.8 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 12 2.076s 2.077s 2.083s 2.083s
parse 12 151µs 158µs 225µs 225µs
reserve 12 9ms 9ms 11ms 11ms
route 12 43µs 20µs 123µs 123µs
encrypt 12 13ms 13ms 13ms 13ms
dispatch 12 51µs 26µs 196µs 196µs
coordinator_to_provider 12 2.036s 2.038s 2.039s 2.039s

Assertion Report: FAIL

Assertion Result Detail
parse:mean<=1ms PASS mean=151.083µs (threshold=1ms)
parse:p95<=5ms PASS p95=225µs (threshold=5ms)
reserve:mean<=50ms PASS mean=9.465333ms (threshold=50ms)
reserve:p95<=200ms PASS p95=10.624ms (threshold=200ms)
encrypt:mean<=5ms FAIL mean=12.898083ms (threshold=5ms)
encrypt:p95<=50ms PASS p95=13.264ms (threshold=50ms)
dispatch:mean<=5ms PASS mean=50.666µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=196µs (threshold=50ms)

@github-actions

github-actions Bot commented May 23, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark Results

Runner: macos-15 (M1 Virtual) | Date: 2026-05-24 00:00 UTC

1-provider-streaming

1 providers, 1 users, 30 requests, concurrency=5, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 30
Success 4
Errors 26
Total Duration 4.083s
Throughput 1.0 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 1.831s 1.831s 1.831s 1.831s
parse 4 58µs 51µs 125µs 125µs
reserve 4 4ms 5ms 6ms 6ms
route 4 23µs 23µs 25µs 25µs
encrypt 4 534µs 543µs 621µs 621µs
dispatch 4 34µs 36µs 52µs 52µs
coordinator_to_provider 4 1.819s 1.82s 1.821s 1.821s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=57.75µs (threshold=1ms)
parse:p95<=5ms PASS p95=125µs (threshold=5ms)
reserve:mean<=50ms PASS mean=4.29325ms (threshold=50ms)
reserve:p95<=200ms PASS p95=6.386ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=533.5µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=621µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=34µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=52µs (threshold=50ms)

1-provider-non-streaming

1 providers, 1 users, 20 requests, concurrency=5, streaming=false

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 20
Success 4
Errors 16
Total Duration 2.319s
Throughput 1.7 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 2.316s 2.317s 2.319s 2.319s
parse 4 36µs 39µs 62µs 62µs
reserve 4 5ms 7ms 7ms 7ms
route 4 84µs 14µs 296µs 296µs
encrypt 4 592µs 593µs 667µs 667µs
dispatch 4 89µs 85µs 226µs 226µs
coordinator_to_provider 4 1.731s 1.731s 1.733s 1.733s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=35.5µs (threshold=1ms)
parse:p95<=5ms PASS p95=62µs (threshold=5ms)
reserve:mean<=50ms PASS mean=5.43075ms (threshold=50ms)
reserve:p95<=200ms PASS p95=7.256ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=591.75µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=667µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=88.5µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=226µs (threshold=50ms)

7-provider-multi-model

7 providers, 5 users, 50 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 4 0.5 GB
mlx-community/gemma-3-270m-4bit 3 0.2 GB
Metric Value
Total Requests 50
Success 43
Errors 7
Total Duration 9.889s
Throughput 4.3 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 43 736ms 3ms 3.864s 3.908s
parse 43 20µs 16µs 29µs 96µs
reserve 43 1ms 1ms 2ms 3ms
route 43 18µs 17µs 27µs 39µs
encrypt 43 391µs 356µs 605µs 949µs
dispatch 43 35µs 30µs 67µs 116µs
coordinator_to_provider 43 733ms 1ms 3.857s 3.901s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=20.069µs (threshold=1ms)
parse:p95<=5ms PASS p95=29µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.230953ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.218ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=391.348µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=605µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=34.511µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=67µs (threshold=50ms)

3-provider-high-concurrency

3 providers, 10 users, 60 requests, concurrency=20, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 60
Success 12
Errors 48
Total Duration 3.541s
Throughput 3.4 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 12 2.199s 2.195s 2.24s 2.24s
parse 12 12µs 10µs 27µs 27µs
reserve 12 2ms 2ms 3ms 3ms
route 12 17µs 18µs 31µs 31µs
encrypt 12 464µs 440µs 697µs 697µs
dispatch 12 21µs 18µs 43µs 43µs
coordinator_to_provider 12 2.192s 2.189s 2.235s 2.235s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=12µs (threshold=1ms)
parse:p95<=5ms PASS p95=27µs (threshold=5ms)
reserve:mean<=50ms PASS mean=2.056083ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.731ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=464.166µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=697µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=21.166µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=43µs (threshold=50ms)

1-provider-queue-saturation

1 providers, 10 users, 40 requests, concurrency=15, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 40
Success 4
Errors 36
Total Duration 3.423s
Throughput 1.2 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 2.251s 2.251s 2.252s 2.252s
parse 4 15µs 18µs 22µs 22µs
reserve 4 2ms 2ms 2ms 2ms
route 4 10µs 11µs 15µs 15µs
encrypt 4 420µs 424µs 484µs 484µs
dispatch 4 15µs 14µs 22µs 22µs
coordinator_to_provider 4 2.246s 2.246s 2.246s 2.246s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=15.25µs (threshold=1ms)
parse:p95<=5ms PASS p95=22µs (threshold=5ms)
reserve:mean<=50ms PASS mean=2.18075ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.378ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=419.75µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=484µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=14.75µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=22µs (threshold=50ms)

3-provider-20-users

3 providers, 20 users, 60 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 60
Success 60
Errors 0
Total Duration 5.196s
Throughput 11.5 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 60 364ms 5ms 2.181s 2.182s
parse 60 18µs 16µs 46µs 77µs
reserve 60 1ms 1ms 2ms 3ms
route 60 15µs 13µs 30µs 32µs
encrypt 60 0s 0s 1ms 3ms
dispatch 60 31µs 23µs 77µs 149µs
coordinator_to_provider 60 361ms 3ms 2.174s 2.176s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=17.966µs (threshold=1ms)
parse:p95<=5ms PASS p95=46µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.219383ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.446ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=405.8µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=742µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=30.9µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=77µs (threshold=50ms)

1-provider-scaling

1 providers, 5 users, 30 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 30
Success 4
Errors 26
Total Duration 2.876s
Throughput 1.4 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 1.998s 1.998s 1.998s 1.998s
parse 4 11µs 11µs 21µs 21µs
reserve 4 2ms 2ms 3ms 3ms
route 4 13µs 15µs 20µs 20µs
encrypt 4 423µs 380µs 692µs 692µs
dispatch 4 27µs 28µs 45µs 45µs
coordinator_to_provider 4 1.992s 1.992s 1.992s 1.992s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=11µs (threshold=1ms)
parse:p95<=5ms PASS p95=21µs (threshold=5ms)
reserve:mean<=50ms PASS mean=2.1085ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.709ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=423.25µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=692µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=27.25µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=45µs (threshold=50ms)

3-provider-scaling

3 providers, 5 users, 30 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 30
Success 30
Errors 0
Total Duration 3.931s
Throughput 7.6 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 30 730ms 5ms 2.196s 2.197s
parse 30 15µs 13µs 23µs 57µs
reserve 30 1ms 1ms 3ms 3ms
route 30 16µs 15µs 30µs 38µs
encrypt 30 384µs 325µs 829µs 892µs
dispatch 30 33µs 23µs 98µs 118µs
coordinator_to_provider 30 726ms 3ms 2.19s 2.191s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=15.366µs (threshold=1ms)
parse:p95<=5ms PASS p95=23µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.402466ms (threshold=50ms)
reserve:p95<=200ms PASS p95=3.362ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=384.033µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=829µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=32.8µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=98µs (threshold=50ms)

5-provider-scaling

5 providers, 5 users, 30 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 5 0.5 GB
Metric Value
Total Requests 30
Success 30
Errors 0
Total Duration 4.199s
Throughput 7.1 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 30 738ms 4ms 2.261s 2.262s
parse 30 16µs 16µs 21µs 27µs
reserve 30 1ms 1ms 2ms 3ms
route 30 21µs 20µs 35µs 35µs
encrypt 30 365µs 351µs 498µs 657µs
dispatch 30 32µs 26µs 60µs 88µs
coordinator_to_provider 30 735ms 1ms 2.254s 2.257s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=15.966µs (threshold=1ms)
parse:p95<=5ms PASS p95=21µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.3519ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.053ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=364.6µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=498µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=31.666µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=60µs (threshold=50ms)

3-provider-heavy-100conc-10kb

3 providers, 20 users, 100 requests, concurrency=100, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 100
Success 12
Errors 88
Total Duration 3.402s
Throughput 3.5 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 12 2.29s 2.292s 2.322s 2.322s
parse 12 141µs 134µs 263µs 263µs
reserve 12 10ms 10ms 12ms 12ms
route 12 21µs 16µs 50µs 50µs
encrypt 12 15ms 16ms 16ms 16ms
dispatch 12 57µs 42µs 197µs 197µs
coordinator_to_provider 12 2.249s 2.248s 2.286s 2.286s

Assertion Report: FAIL

Assertion Result Detail
parse:mean<=1ms PASS mean=141µs (threshold=1ms)
parse:p95<=5ms PASS p95=263µs (threshold=5ms)
reserve:mean<=50ms PASS mean=9.872333ms (threshold=50ms)
reserve:p95<=200ms PASS p95=12.304ms (threshold=200ms)
encrypt:mean<=5ms FAIL mean=14.829ms (threshold=5ms)
encrypt:p95<=50ms PASS p95=16.355ms (threshold=50ms)
dispatch:mean<=5ms PASS mean=56.833µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=197µs (threshold=50ms)

@github-actions

github-actions Bot commented May 24, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark Results

Runner: macos-15 (M1 Virtual) | Date: 2026-05-24 00:24 UTC

1-provider-streaming

1 providers, 1 users, 30 requests, concurrency=5, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 30
Success 4
Errors 26
Total Duration 3.872s
Throughput 1.0 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 1.788s 1.788s 1.788s 1.788s
parse 4 33µs 45µs 47µs 47µs
reserve 4 4ms 5ms 6ms 6ms
route 4 19µs 22µs 23µs 23µs
encrypt 4 506µs 521µs 536µs 536µs
dispatch 4 33µs 39µs 43µs 43µs
coordinator_to_provider 4 1.778s 1.778s 1.78s 1.78s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=33.25µs (threshold=1ms)
parse:p95<=5ms PASS p95=47µs (threshold=5ms)
reserve:mean<=50ms PASS mean=4.16325ms (threshold=50ms)
reserve:p95<=200ms PASS p95=5.993ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=506µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=536µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=33µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=43µs (threshold=50ms)

1-provider-non-streaming

1 providers, 1 users, 20 requests, concurrency=5, streaming=false

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 20
Success 4
Errors 16
Total Duration 2.316s
Throughput 1.7 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 2.313s 2.314s 2.316s 2.316s
parse 4 40µs 26µs 93µs 93µs
reserve 4 5ms 5ms 7ms 7ms
route 4 20µs 22µs 27µs 27µs
encrypt 4 569µs 611µs 615µs 615µs
dispatch 4 35µs 37µs 42µs 42µs
coordinator_to_provider 4 1.706s 1.707s 1.708s 1.708s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=40µs (threshold=1ms)
parse:p95<=5ms PASS p95=93µs (threshold=5ms)
reserve:mean<=50ms PASS mean=4.73825ms (threshold=50ms)
reserve:p95<=200ms PASS p95=6.545ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=568.75µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=615µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=34.75µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=42µs (threshold=50ms)

7-provider-multi-model

7 providers, 5 users, 50 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 4 0.5 GB
mlx-community/gemma-3-270m-4bit 3 0.2 GB
Metric Value
Total Requests 50
Success 43
Errors 7
Total Duration 9.542s
Throughput 4.5 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 43 680ms 4ms 3.52s 3.542s
parse 42 19µs 18µs 33µs 56µs
reserve 42 1ms 1ms 2ms 3ms
route 42 25µs 19µs 59µs 86µs
encrypt 43 425µs 393µs 761µs 887µs
dispatch 43 37µs 29µs 94µs 134µs
coordinator_to_provider 43 618ms 1ms 3.474s 3.536s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=19.428µs (threshold=1ms)
parse:p95<=5ms PASS p95=33µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.370952ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.21ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=424.534µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=761µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=37.395µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=94µs (threshold=50ms)

3-provider-high-concurrency

3 providers, 10 users, 60 requests, concurrency=20, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 60
Success 12
Errors 48
Total Duration 3.203s
Throughput 3.7 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 12 2.109s 2.097s 2.133s 2.133s
parse 12 25µs 14µs 70µs 70µs
reserve 12 2ms 2ms 3ms 3ms
route 12 38µs 21µs 91µs 91µs
encrypt 12 1ms 1ms 1ms 1ms
dispatch 12 36µs 15µs 212µs 212µs
coordinator_to_provider 12 2.102s 2.091s 2.127s 2.127s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=24.5µs (threshold=1ms)
parse:p95<=5ms PASS p95=70µs (threshold=5ms)
reserve:mean<=50ms PASS mean=2.0925ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.539ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=649.25µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=1.005ms (threshold=50ms)
dispatch:mean<=5ms PASS mean=36.083µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=212µs (threshold=50ms)

1-provider-queue-saturation

1 providers, 10 users, 40 requests, concurrency=15, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 40
Success 5
Errors 35
Total Duration 3.187s
Throughput 1.6 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 5 2.131s 1.905s 3.035s 3.035s
parse 5 15µs 14µs 21µs 21µs
reserve 5 3ms 3ms 3ms 3ms
route 5 605ms 0s 3.023s 3.023s
queue_wait 1 3.023s 3.023s 3.023s 3.023s
encrypt 5 1ms 1ms 1ms 1ms
dispatch 5 30µs 32µs 42µs 42µs
coordinator_to_provider 5 1.52s 1.898s 1.899s 1.899s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=14.8µs (threshold=1ms)
parse:p95<=5ms PASS p95=21µs (threshold=5ms)
reserve:mean<=50ms PASS mean=3.2282ms (threshold=50ms)
reserve:p95<=200ms PASS p95=3.424ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=751.2µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=1.158ms (threshold=50ms)
dispatch:mean<=5ms PASS mean=30µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=42µs (threshold=50ms)

3-provider-20-users

3 providers, 20 users, 60 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 60
Success 60
Errors 0
Total Duration 5.776s
Throughput 10.4 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 60 404ms 5ms 2.417s 2.417s
parse 60 22µs 18µs 52µs 78µs
reserve 60 1ms 1ms 3ms 3ms
route 60 18µs 15µs 40µs 49µs
encrypt 60 397µs 365µs 606µs 806µs
dispatch 60 29µs 26µs 65µs 104µs
coordinator_to_provider 60 401ms 3ms 2.409s 2.41s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=22.383µs (threshold=1ms)
parse:p95<=5ms PASS p95=52µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.316083ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.735ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=397.333µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=606µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=28.883µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=65µs (threshold=50ms)

1-provider-scaling

1 providers, 5 users, 30 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 30
Success 4
Errors 26
Total Duration 3.098s
Throughput 1.3 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 2.154s 2.154s 2.154s 2.154s
parse 4 24µs 24µs 27µs 27µs
reserve 4 2ms 2ms 3ms 3ms
route 4 12µs 14µs 16µs 16µs
encrypt 4 523µs 497µs 803µs 803µs
dispatch 4 16µs 16µs 20µs 20µs
coordinator_to_provider 4 2.149s 2.148s 2.149s 2.149s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=23.75µs (threshold=1ms)
parse:p95<=5ms PASS p95=27µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.9895ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.583ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=522.75µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=803µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=15.75µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=20µs (threshold=50ms)

3-provider-scaling

3 providers, 5 users, 30 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 30
Success 30
Errors 0
Total Duration 3.966s
Throughput 7.6 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 30 736ms 9ms 2.209s 2.209s
parse 30 20µs 15µs 60µs 76µs
reserve 30 2ms 1ms 3ms 3ms
route 30 20µs 13µs 62µs 142µs
encrypt 30 439µs 405µs 785µs 806µs
dispatch 30 28µs 22µs 68µs 77µs
coordinator_to_provider 30 731ms 5ms 2.203s 2.203s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=20.166µs (threshold=1ms)
parse:p95<=5ms PASS p95=60µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.579933ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.86ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=438.666µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=785µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=27.866µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=68µs (threshold=50ms)

5-provider-scaling

5 providers, 5 users, 30 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 5 0.5 GB
Metric Value
Total Requests 30
Success 30
Errors 0
Total Duration 4.206s
Throughput 7.1 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 30 785ms 5ms 2.395s 2.395s
parse 30 22µs 19µs 43µs 47µs
reserve 30 2ms 1ms 3ms 4ms
route 30 24µs 21µs 56µs 58µs
encrypt 30 0s 0s 1ms 1ms
dispatch 30 35µs 31µs 77µs 94µs
coordinator_to_provider 30 781ms 2ms 2.387s 2.389s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=21.633µs (threshold=1ms)
parse:p95<=5ms PASS p95=43µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.7952ms (threshold=50ms)
reserve:p95<=200ms PASS p95=3.428ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=456.666µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=846µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=35.433µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=77µs (threshold=50ms)

3-provider-heavy-100conc-10kb

3 providers, 20 users, 100 requests, concurrency=100, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 100
Success 12
Errors 88
Total Duration 3.383s
Throughput 3.5 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 12 2.192s 2.161s 2.286s 2.286s
parse 12 97µs 81µs 290µs 290µs
reserve 12 9ms 9ms 9ms 9ms
route 12 11µs 10µs 21µs 21µs
encrypt 12 18ms 19ms 19ms 19ms
dispatch 12 47µs 36µs 126µs 126µs
coordinator_to_provider 12 2.154s 2.123s 2.248s 2.248s

Assertion Report: FAIL

Assertion Result Detail
parse:mean<=1ms PASS mean=97.333µs (threshold=1ms)
parse:p95<=5ms PASS p95=290µs (threshold=5ms)
reserve:mean<=50ms PASS mean=8.97825ms (threshold=50ms)
reserve:p95<=200ms PASS p95=9.373ms (threshold=200ms)
encrypt:mean<=5ms FAIL mean=18.491666ms (threshold=5ms)
encrypt:p95<=50ms PASS p95=18.85ms (threshold=50ms)
dispatch:mean<=5ms PASS mean=47.083µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=126µs (threshold=50ms)

@github-actions

github-actions Bot commented May 24, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark Results

Runner: macos-15 (M1 Virtual) | Date: 2026-05-24 01:39 UTC

1-provider-streaming

1 providers, 1 users, 30 requests, concurrency=5, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 30
Success 4
Errors 26
Total Duration 3.822s
Throughput 1.0 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 1.735s 1.735s 1.735s 1.735s
parse 4 20µs 31µs 40µs 40µs
reserve 4 3ms 3ms 4ms 4ms
route 4 10µs 14µs 15µs 15µs
encrypt 4 310µs 323µs 351µs 351µs
dispatch 4 23µs 24µs 25µs 25µs
coordinator_to_provider 4 1.728s 1.729s 1.73s 1.73s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=20.25µs (threshold=1ms)
parse:p95<=5ms PASS p95=40µs (threshold=5ms)
reserve:mean<=50ms PASS mean=2.59475ms (threshold=50ms)
reserve:p95<=200ms PASS p95=3.91ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=310.25µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=351µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=23µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=25µs (threshold=50ms)

1-provider-non-streaming

1 providers, 1 users, 20 requests, concurrency=5, streaming=false

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 20
Success 4
Errors 16
Total Duration 2.263s
Throughput 1.8 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 2.26s 2.261s 2.263s 2.263s
parse 4 19µs 25µs 28µs 28µs
reserve 4 4ms 4ms 6ms 6ms
route 4 17µs 18µs 23µs 23µs
encrypt 4 543µs 536µs 694µs 694µs
dispatch 4 46µs 53µs 82µs 82µs
coordinator_to_provider 4 1.673s 1.673s 1.675s 1.675s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=19µs (threshold=1ms)
parse:p95<=5ms PASS p95=28µs (threshold=5ms)
reserve:mean<=50ms PASS mean=3.95825ms (threshold=50ms)
reserve:p95<=200ms PASS p95=5.71ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=543.25µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=694µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=46µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=82µs (threshold=50ms)

7-provider-multi-model

7 providers, 5 users, 50 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 4 0.5 GB
mlx-community/gemma-3-270m-4bit 3 0.2 GB
Metric Value
Total Requests 50
Success 43
Errors 7
Total Duration 9.653s
Throughput 4.5 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 43 681ms 4ms 3.574s 3.585s
parse 42 18µs 16µs 28µs 46µs
reserve 42 2ms 1ms 4ms 12ms
route 42 21µs 18µs 34µs 78µs
encrypt 43 1ms 0s 1ms 3ms
dispatch 43 35µs 30µs 68µs 113µs
coordinator_to_provider 43 618ms 1ms 3.529s 3.578s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=17.785µs (threshold=1ms)
parse:p95<=5ms PASS p95=28µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.751547ms (threshold=50ms)
reserve:p95<=200ms PASS p95=3.594ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=500.348µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=830µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=34.976µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=68µs (threshold=50ms)

3-provider-high-concurrency

3 providers, 10 users, 60 requests, concurrency=20, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 60
Success 12
Errors 48
Total Duration 3.166s
Throughput 3.8 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 12 2.018s 2.008s 2.043s 2.043s
parse 12 11µs 10µs 31µs 31µs
reserve 12 2ms 3ms 3ms 3ms
route 12 15µs 14µs 31µs 31µs
encrypt 12 582µs 588µs 907µs 907µs
dispatch 12 29µs 29µs 56µs 56µs
coordinator_to_provider 12 2.009s 2s 2.035s 2.035s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=11.416µs (threshold=1ms)
parse:p95<=5ms PASS p95=31µs (threshold=5ms)
reserve:mean<=50ms PASS mean=2.4945ms (threshold=50ms)
reserve:p95<=200ms PASS p95=3.155ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=582.166µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=907µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=29.25µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=56µs (threshold=50ms)

1-provider-queue-saturation

1 providers, 10 users, 40 requests, concurrency=15, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 40
Success 4
Errors 36
Total Duration 3.015s
Throughput 1.3 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 1.995s 1.995s 1.995s 1.995s
parse 4 17µs 17µs 22µs 22µs
reserve 4 2ms 2ms 2ms 2ms
route 4 11µs 13µs 14µs 14µs
encrypt 4 469µs 456µs 518µs 518µs
dispatch 4 25µs 25µs 40µs 40µs
coordinator_to_provider 4 1.989s 1.99s 1.99s 1.99s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=16.75µs (threshold=1ms)
parse:p95<=5ms PASS p95=22µs (threshold=5ms)
reserve:mean<=50ms PASS mean=2.20425ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.266ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=469µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=518µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=24.5µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=40µs (threshold=50ms)

3-provider-20-users

3 providers, 20 users, 60 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 60
Success 60
Errors 0
Total Duration 5.36s
Throughput 11.2 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 60 364ms 4ms 2.173s 2.173s
parse 60 19µs 16µs 41µs 52µs
reserve 60 1ms 1ms 3ms 3ms
route 60 23µs 17µs 40µs 306µs
encrypt 60 421µs 398µs 707µs 800µs
dispatch 60 35µs 30µs 87µs 118µs
coordinator_to_provider 60 361ms 1ms 2.165s 2.167s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=18.65µs (threshold=1ms)
parse:p95<=5ms PASS p95=41µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.3745ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.794ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=420.816µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=707µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=35.35µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=87µs (threshold=50ms)

1-provider-scaling

1 providers, 5 users, 30 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 30
Success 4
Errors 26
Total Duration 3.025s
Throughput 1.3 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 2.207s 2.207s 2.207s 2.207s
parse 4 18µs 18µs 25µs 25µs
reserve 4 2ms 3ms 3ms 3ms
route 4 12µs 12µs 19µs 19µs
encrypt 4 525µs 538µs 651µs 651µs
dispatch 4 57µs 61µs 99µs 99µs
coordinator_to_provider 4 2.201s 2.201s 2.202s 2.202s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=18µs (threshold=1ms)
parse:p95<=5ms PASS p95=25µs (threshold=5ms)
reserve:mean<=50ms PASS mean=2.376ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.79ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=524.75µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=651µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=57.25µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=99µs (threshold=50ms)

3-provider-scaling

3 providers, 5 users, 30 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 30
Success 30
Errors 0
Total Duration 4.068s
Throughput 7.4 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 30 716ms 7ms 2.149s 2.149s
parse 30 19µs 14µs 45µs 50µs
reserve 30 2ms 1ms 3ms 4ms
route 30 37µs 13µs 255µs 376µs
encrypt 30 0s 0s 1ms 1ms
dispatch 30 35µs 26µs 104µs 104µs
coordinator_to_provider 30 712ms 4ms 2.142s 2.142s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=18.933µs (threshold=1ms)
parse:p95<=5ms PASS p95=45µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.649ms (threshold=50ms)
reserve:p95<=200ms PASS p95=3.241ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=455.366µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=710µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=35.133µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=104µs (threshold=50ms)

5-provider-scaling

5 providers, 5 users, 30 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 5 0.5 GB
Metric Value
Total Requests 30
Success 30
Errors 0
Total Duration 4.225s
Throughput 7.1 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 30 767ms 4ms 2.33s 2.331s
parse 30 20µs 17µs 48µs 53µs
reserve 30 1ms 1ms 2ms 3ms
route 30 20µs 19µs 34µs 53µs
encrypt 30 387µs 373µs 539µs 746µs
dispatch 30 30µs 24µs 60µs 100µs
coordinator_to_provider 30 763ms 1ms 2.321s 2.324s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=20.233µs (threshold=1ms)
parse:p95<=5ms PASS p95=48µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.4602ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.441ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=387.466µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=539µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=29.5µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=60µs (threshold=50ms)

3-provider-heavy-100conc-10kb

3 providers, 20 users, 100 requests, concurrency=100, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 100
Success 12
Errors 88
Total Duration 3.328s
Throughput 3.6 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 12 2.196s 2.209s 2.212s 2.212s
parse 12 85µs 81µs 139µs 139µs
reserve 12 7ms 8ms 8ms 8ms
route 12 12µs 9µs 24µs 24µs
encrypt 12 24ms 24ms 25ms 25ms
dispatch 12 37µs 33µs 79µs 79µs
coordinator_to_provider 12 2.155s 2.168s 2.17s 2.17s

Assertion Report: FAIL

Assertion Result Detail
parse:mean<=1ms PASS mean=84.833µs (threshold=1ms)
parse:p95<=5ms PASS p95=139µs (threshold=5ms)
reserve:mean<=50ms PASS mean=7.44475ms (threshold=50ms)
reserve:p95<=200ms PASS p95=8.123ms (threshold=200ms)
encrypt:mean<=5ms FAIL mean=24.293333ms (threshold=5ms)
encrypt:p95<=50ms PASS p95=24.932ms (threshold=50ms)
dispatch:mean<=5ms PASS mean=36.583µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=79µs (threshold=50ms)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cfdd251317

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Gajesh2007

Copy link
Copy Markdown
Member Author

Addressed the latest Codex review in 7bb75bf.

Fixed:

  • Active model registry list failures now propagate through ListActiveModelRegistryWithError; catalog/list handlers return 500 instead of falling back silently.
  • Publishing key lookup failures now return 500 instead of misleading 401s; env bootstrap key still works without DB lookup.
  • Manifest downloads stage into snapshots/.local-staging-* and only replace snapshots/local after all hashes/aggregate verification succeed, preserving any existing working snapshot on failure.
  • Manifest validation rejects case-insensitive path collisions (Config.json vs config.json).
  • loadModelRegistryFiles checks rows.Err() after iteration.

Validation rerun:

  • go test ./coordinator/...
  • swift test --filter ModelCatalogTests
  • swift test --filter ProviderCoreFoundationTests

@github-actions

github-actions Bot commented May 24, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark Results

Runner: macos-15 (M1 Virtual) | Date: 2026-05-24 02:15 UTC

1-provider-streaming

1 providers, 1 users, 30 requests, concurrency=5, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 30
Success 4
Errors 26
Total Duration 3.763s
Throughput 1.1 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 1.725s 1.725s 1.726s 1.726s
parse 4 172µs 138µs 490µs 490µs
reserve 4 5ms 5ms 6ms 6ms
route 4 31µs 28µs 60µs 60µs
encrypt 4 552µs 564µs 572µs 572µs
dispatch 4 67µs 38µs 165µs 165µs
coordinator_to_provider 4 1.709s 1.71s 1.711s 1.711s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=171.5µs (threshold=1ms)
parse:p95<=5ms PASS p95=490µs (threshold=5ms)
reserve:mean<=50ms PASS mean=5.01375ms (threshold=50ms)
reserve:p95<=200ms PASS p95=6.156ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=551.5µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=572µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=66.5µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=165µs (threshold=50ms)

1-provider-non-streaming

1 providers, 1 users, 20 requests, concurrency=5, streaming=false

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 20
Success 4
Errors 16
Total Duration 2.436s
Throughput 1.6 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 2.434s 2.434s 2.436s 2.436s
parse 4 16µs 15µs 30µs 30µs
reserve 4 3ms 3ms 4ms 4ms
route 4 10µs 13µs 15µs 15µs
encrypt 4 347µs 343µs 377µs 377µs
dispatch 4 30µs 29µs 49µs 49µs
coordinator_to_provider 4 1.822s 1.822s 1.823s 1.823s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=16µs (threshold=1ms)
parse:p95<=5ms PASS p95=30µs (threshold=5ms)
reserve:mean<=50ms PASS mean=2.97775ms (threshold=50ms)
reserve:p95<=200ms PASS p95=4.387ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=346.75µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=377µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=29.75µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=49µs (threshold=50ms)

7-provider-multi-model

7 providers, 5 users, 50 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 4 0.5 GB
mlx-community/gemma-3-270m-4bit 3 0.2 GB
Metric Value
Total Requests 50
Success 44
Errors 6
Total Duration 9.748s
Throughput 4.5 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 44 662ms 4ms 3.534s 3.543s
parse 44 17µs 16µs 27µs 32µs
reserve 44 1ms 1ms 2ms 4ms
route 44 20µs 18µs 37µs 55µs
encrypt 44 391µs 359µs 602µs 682µs
dispatch 44 31µs 28µs 63µs 76µs
coordinator_to_provider 44 659ms 1ms 3.526s 3.536s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=16.681µs (threshold=1ms)
parse:p95<=5ms PASS p95=27µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.370295ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.368ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=391.045µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=602µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=31.136µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=63µs (threshold=50ms)

3-provider-high-concurrency

3 providers, 10 users, 60 requests, concurrency=20, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 60
Success 12
Errors 48
Total Duration 3.24s
Throughput 3.7 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 12 2.121s 2.104s 2.169s 2.169s
parse 12 18µs 17µs 33µs 33µs
reserve 12 2ms 2ms 3ms 3ms
route 12 16µs 16µs 37µs 37µs
encrypt 12 449µs 462µs 562µs 562µs
dispatch 12 18µs 16µs 37µs 37µs
coordinator_to_provider 12 2.114s 2.098s 2.163s 2.163s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=17.916µs (threshold=1ms)
parse:p95<=5ms PASS p95=33µs (threshold=5ms)
reserve:mean<=50ms PASS mean=2.283333ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.721ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=448.583µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=562µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=18.416µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=37µs (threshold=50ms)

1-provider-queue-saturation

1 providers, 10 users, 40 requests, concurrency=15, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 40
Success 4
Errors 36
Total Duration 3.052s
Throughput 1.3 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 2.134s 2.134s 2.134s 2.134s
parse 4 21µs 19µs 44µs 44µs
reserve 4 3ms 3ms 3ms 3ms
route 4 10µs 9µs 14µs 14µs
encrypt 4 477µs 507µs 575µs 575µs
dispatch 4 20µs 25µs 30µs 30µs
coordinator_to_provider 4 2.129s 2.128s 2.129s 2.129s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=21µs (threshold=1ms)
parse:p95<=5ms PASS p95=44µs (threshold=5ms)
reserve:mean<=50ms PASS mean=2.8035ms (threshold=50ms)
reserve:p95<=200ms PASS p95=3.026ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=477.25µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=575µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=20µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=30µs (threshold=50ms)

3-provider-20-users

3 providers, 20 users, 60 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 60
Success 60
Errors 0
Total Duration 5.289s
Throughput 11.3 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 60 360ms 4ms 2.174s 2.174s
parse 60 15µs 14µs 32µs 36µs
reserve 60 1ms 1ms 2ms 3ms
route 60 27µs 14µs 117µs 342µs
encrypt 60 0s 0s 1ms 1ms
dispatch 60 32µs 27µs 69µs 127µs
coordinator_to_provider 60 357ms 1ms 2.166s 2.167s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=15.333µs (threshold=1ms)
parse:p95<=5ms PASS p95=32µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.2503ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.495ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=412.316µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=1.131ms (threshold=50ms)
dispatch:mean<=5ms PASS mean=31.916µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=69µs (threshold=50ms)

1-provider-scaling

1 providers, 5 users, 30 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 30
Success 5
Errors 25
Total Duration 3.502s
Throughput 1.4 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 5 2.483s 2.291s 3.252s 3.252s
parse 5 18µs 14µs 30µs 30µs
reserve 5 5ms 5ms 6ms 6ms
route 5 646ms 0s 3.232s 3.232s
queue_wait 1 3.233s 3.233s 3.233s 3.233s
encrypt 5 457µs 445µs 544µs 544µs
dispatch 5 0s 0s 2ms 2ms
coordinator_to_provider 5 1.825s 2.279s 2.281s 2.281s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=18µs (threshold=1ms)
parse:p95<=5ms PASS p95=30µs (threshold=5ms)
reserve:mean<=50ms PASS mean=4.7948ms (threshold=50ms)
reserve:p95<=200ms PASS p95=5.68ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=457.4µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=544µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=396µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=1.894ms (threshold=50ms)

3-provider-scaling

3 providers, 5 users, 30 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 30
Success 30
Errors 0
Total Duration 4.096s
Throughput 7.3 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 30 731ms 7ms 2.205s 2.205s
parse 30 17µs 15µs 39µs 46µs
reserve 30 2ms 1ms 3ms 4ms
route 30 16µs 16µs 35µs 35µs
encrypt 30 401µs 381µs 595µs 673µs
dispatch 30 32µs 24µs 66µs 126µs
coordinator_to_provider 30 726ms 4ms 2.198s 2.198s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=17.3µs (threshold=1ms)
parse:p95<=5ms PASS p95=39µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.616266ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.954ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=400.9µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=595µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=31.666µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=66µs (threshold=50ms)

5-provider-scaling

5 providers, 5 users, 30 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 5 0.5 GB
Metric Value
Total Requests 30
Success 30
Errors 0
Total Duration 4.059s
Throughput 7.4 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 30 741ms 4ms 2.226s 2.227s
parse 30 18µs 17µs 30µs 32µs
reserve 30 2ms 1ms 3ms 3ms
route 30 16µs 16µs 26µs 28µs
encrypt 30 416µs 338µs 723µs 764µs
dispatch 30 30µs 26µs 72µs 84µs
coordinator_to_provider 30 737ms 1ms 2.219s 2.221s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=17.533µs (threshold=1ms)
parse:p95<=5ms PASS p95=30µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.523266ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.817ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=416.4µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=723µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=29.7µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=72µs (threshold=50ms)

3-provider-heavy-100conc-10kb

3 providers, 20 users, 100 requests, concurrency=100, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 100
Success 15
Errors 85
Total Duration 3.607s
Throughput 4.2 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 15 2.448s 2.265s 3.211s 3.211s
parse 15 83µs 79µs 137µs 137µs
reserve 15 9ms 9ms 9ms 9ms
route 15 637ms 0s 3.186s 3.186s
queue_wait 3 3.184s 3.183s 3.187s 3.187s
encrypt 15 14ms 18ms 18ms 18ms
dispatch 15 46µs 33µs 188µs 188µs
coordinator_to_provider 15 1.778s 2.228s 2.232s 2.232s

Assertion Report: FAIL

Assertion Result Detail
parse:mean<=1ms PASS mean=82.6µs (threshold=1ms)
parse:p95<=5ms PASS p95=137µs (threshold=5ms)
reserve:mean<=50ms PASS mean=8.8406ms (threshold=50ms)
reserve:p95<=200ms PASS p95=9.235ms (threshold=200ms)
encrypt:mean<=5ms FAIL mean=14.364333ms (threshold=5ms)
encrypt:p95<=50ms PASS p95=18.225ms (threshold=50ms)
dispatch:mean<=5ms PASS mean=46.2µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=188µs (threshold=50ms)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7bb75bf97d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread coordinator/registry/registry.go Resolved
@Gajesh2007

Copy link
Copy Markdown
Member Author

Addressed the latest Codex finding in fd79e1d.

Fixed:

  • Provider model inventories are no longer destructively filtered during registration.
  • Catalog checks (including empty deny-all catalogs and weight-hash mismatches) are now applied dynamically during routing, listing, and capacity snapshots.
  • Providers that connect before the first model is promoted become routable as soon as the catalog is updated, without reconnecting.

Validation rerun:

  • go test ./coordinator/...
  • swift test --filter ModelCatalogTests
  • swift test --filter ProviderCoreFoundationTests

@Gajesh2007

Copy link
Copy Markdown
Member Author

@claude @codex review all the PR after all these changes

@github-actions

github-actions Bot commented May 24, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark Results

Runner: macos-15 (M1 Virtual) | Date: 2026-05-24 18:52 UTC

1-provider-streaming

1 providers, 1 users, 30 requests, concurrency=5, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 30
Success 4
Errors 26
Total Duration 3.876s
Throughput 1.0 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 1.781s 1.781s 1.781s 1.781s
parse 4 62µs 81µs 105µs 105µs
reserve 4 6ms 7ms 10ms 10ms
route 4 63µs 24µs 187µs 187µs
encrypt 4 649µs 648µs 845µs 845µs
dispatch 4 45µs 48µs 59µs 59µs
coordinator_to_provider 4 1.767s 1.767s 1.769s 1.769s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=62.25µs (threshold=1ms)
parse:p95<=5ms PASS p95=105µs (threshold=5ms)
reserve:mean<=50ms PASS mean=5.96075ms (threshold=50ms)
reserve:p95<=200ms PASS p95=9.515ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=649.25µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=845µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=44.75µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=59µs (threshold=50ms)

1-provider-non-streaming

1 providers, 1 users, 20 requests, concurrency=5, streaming=false

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 20
Success 4
Errors 16
Total Duration 2.492s
Throughput 1.6 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 2.489s 2.49s 2.492s 2.492s
parse 4 16µs 17µs 19µs 19µs
reserve 4 3ms 4ms 5ms 5ms
route 4 10µs 10µs 14µs 14µs
encrypt 4 401µs 414µs 414µs 414µs
dispatch 4 38µs 26µs 85µs 85µs
coordinator_to_provider 4 1.872s 1.873s 1.874s 1.874s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=15.5µs (threshold=1ms)
parse:p95<=5ms PASS p95=19µs (threshold=5ms)
reserve:mean<=50ms PASS mean=3.3075ms (threshold=50ms)
reserve:p95<=200ms PASS p95=4.832ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=400.75µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=414µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=37.5µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=85µs (threshold=50ms)

7-provider-multi-model

7 providers, 5 users, 50 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 4 0.5 GB
mlx-community/gemma-3-270m-4bit 3 0.2 GB
Metric Value
Total Requests 50
Success 43
Errors 7
Total Duration 9.667s
Throughput 4.4 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 43 689ms 4ms 3.528s 3.577s
parse 41 17µs 16µs 31µs 44µs
reserve 41 1ms 1ms 3ms 5ms
route 41 20µs 18µs 42µs 47µs
encrypt 43 1ms 0s 1ms 3ms
dispatch 43 33µs 28µs 76µs 91µs
coordinator_to_provider 43 569ms 1ms 3.518s 3.571s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=17.487µs (threshold=1ms)
parse:p95<=5ms PASS p95=31µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.376804ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.551ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=537.906µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=855µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=33.465µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=76µs (threshold=50ms)

3-provider-high-concurrency

3 providers, 10 users, 60 requests, concurrency=20, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 60
Success 12
Errors 48
Total Duration 3.867s
Throughput 3.1 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 12 2.297s 2.284s 2.363s 2.363s
parse 12 33µs 14µs 160µs 160µs
reserve 12 3ms 3ms 4ms 4ms
route 12 16µs 15µs 38µs 38µs
encrypt 12 534µs 593µs 669µs 669µs
dispatch 12 32µs 23µs 66µs 66µs
coordinator_to_provider 12 2.288s 2.276s 2.356s 2.356s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=32.916µs (threshold=1ms)
parse:p95<=5ms PASS p95=160µs (threshold=5ms)
reserve:mean<=50ms PASS mean=2.581833ms (threshold=50ms)
reserve:p95<=200ms PASS p95=3.905ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=533.666µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=669µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=32µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=66µs (threshold=50ms)

1-provider-queue-saturation

1 providers, 10 users, 40 requests, concurrency=15, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 40
Success 4
Errors 36
Total Duration 2.907s
Throughput 1.4 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 2.063s 2.063s 2.063s 2.063s
parse 4 15µs 17µs 21µs 21µs
reserve 4 2ms 2ms 2ms 2ms
route 4 12µs 11µs 14µs 14µs
encrypt 4 529µs 556µs 663µs 663µs
dispatch 4 17µs 19µs 24µs 24µs
coordinator_to_provider 4 2.057s 2.057s 2.058s 2.058s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=14.5µs (threshold=1ms)
parse:p95<=5ms PASS p95=21µs (threshold=5ms)
reserve:mean<=50ms PASS mean=2.168ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.411ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=529µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=663µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=17µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=24µs (threshold=50ms)

3-provider-20-users

3 providers, 20 users, 60 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 60
Success 60
Errors 0
Total Duration 5.736s
Throughput 10.5 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 60 398ms 5ms 2.37s 2.37s
parse 60 18µs 15µs 35µs 87µs
reserve 60 1ms 1ms 3ms 4ms
route 60 18µs 17µs 35µs 46µs
encrypt 60 409µs 403µs 622µs 912µs
dispatch 60 33µs 30µs 61µs 122µs
coordinator_to_provider 60 395ms 3ms 2.362s 2.364s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=17.983µs (threshold=1ms)
parse:p95<=5ms PASS p95=35µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.475316ms (threshold=50ms)
reserve:p95<=200ms PASS p95=3.064ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=408.666µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=622µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=33.3µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=61µs (threshold=50ms)

1-provider-scaling

1 providers, 5 users, 30 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 30
Success 5
Errors 25
Total Duration 3.076s
Throughput 1.6 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 5 2.301s 2.15s 2.907s 2.907s
parse 5 16µs 17µs 24µs 24µs
reserve 5 2ms 2ms 2ms 2ms
route 5 579ms 0s 2.893s 2.893s
queue_wait 1 2.893s 2.893s 2.893s 2.893s
encrypt 5 431µs 378µs 625µs 625µs
dispatch 5 37µs 21µs 77µs 77µs
coordinator_to_provider 5 1.718s 2.145s 2.145s 2.145s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=16.2µs (threshold=1ms)
parse:p95<=5ms PASS p95=24µs (threshold=5ms)
reserve:mean<=50ms PASS mean=2.207ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.406ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=430.6µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=625µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=36.8µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=77µs (threshold=50ms)

3-provider-scaling

3 providers, 5 users, 30 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 30
Success 30
Errors 0
Total Duration 4.068s
Throughput 7.4 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 30 700ms 6ms 2.112s 2.112s
parse 30 17µs 13µs 27µs 103µs
reserve 30 2ms 1ms 5ms 5ms
route 30 16µs 13µs 30µs 67µs
encrypt 30 447µs 391µs 870µs 918µs
dispatch 30 27µs 22µs 66µs 68µs
coordinator_to_provider 30 695ms 4ms 2.102s 2.103s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=17.3µs (threshold=1ms)
parse:p95<=5ms PASS p95=27µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.945733ms (threshold=50ms)
reserve:p95<=200ms PASS p95=4.93ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=447.1µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=870µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=27.3µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=66µs (threshold=50ms)

5-provider-scaling

5 providers, 5 users, 30 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 5 0.5 GB
Metric Value
Total Requests 30
Success 30
Errors 0
Total Duration 4.197s
Throughput 7.1 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 30 779ms 4ms 2.35s 2.35s
parse 30 21µs 17µs 60µs 103µs
reserve 30 2ms 1ms 4ms 4ms
route 30 64µs 20µs 490µs 519µs
encrypt 30 423µs 407µs 622µs 790µs
dispatch 30 37µs 28µs 99µs 115µs
coordinator_to_provider 30 775ms 1ms 2.343s 2.345s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=21.066µs (threshold=1ms)
parse:p95<=5ms PASS p95=60µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.612866ms (threshold=50ms)
reserve:p95<=200ms PASS p95=3.544ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=422.966µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=622µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=37µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=99µs (threshold=50ms)

3-provider-heavy-100conc-10kb

3 providers, 20 users, 100 requests, concurrency=100, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 100
Success 12
Errors 88
Total Duration 3.31s
Throughput 3.6 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 12 2.221s 2.234s 2.238s 2.238s
parse 12 81µs 82µs 92µs 92µs
reserve 12 8ms 8ms 9ms 9ms
route 12 23µs 15µs 70µs 70µs
encrypt 12 19ms 20ms 21ms 21ms
dispatch 12 45µs 46µs 75µs 75µs
coordinator_to_provider 12 2.183s 2.194s 2.204s 2.204s

Assertion Report: FAIL

Assertion Result Detail
parse:mean<=1ms PASS mean=80.583µs (threshold=1ms)
parse:p95<=5ms PASS p95=92µs (threshold=5ms)
reserve:mean<=50ms PASS mean=8.338583ms (threshold=50ms)
reserve:p95<=200ms PASS p95=9.159ms (threshold=200ms)
encrypt:mean<=5ms FAIL mean=19.346916ms (threshold=5ms)
encrypt:p95<=50ms PASS p95=20.972ms (threshold=50ms)
dispatch:mean<=5ms PASS mean=45.083µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=75µs (threshold=50ms)

@claude

claude Bot commented May 24, 2026 •

Copy link
Copy Markdown

Claude finished @Gajesh2007's task in 7m 44s —— View job


Claude's PR Review

  • Gather context and understand the request
  • Review coordinator Go changes (registry handlers, store, server)
  • Review Swift provider changes (ModelCatalog, ManifestBuilder, ModelScanner)
  • Review GitHub workflow and scripts
  • Review tests
  • Post comprehensive findings

PR Review: feat: add DB-backed model registry (current HEAD: fd79e1d)

This is a fresh review after all previous fixes were applied across 10 commits. The core architecture is sound and the previous reviews' findings are well-addressed. Remaining issues are mostly P2/P3.


✅ Previously-Flagged Issues — Confirmed Fixed

Issue Status
SHA-256 verified on .part file before atomic rename (ModelCatalog.swift:676-683) ✅ Fixed
Staging downloads in .local-staging-{UUID} before replacing snapshots/local ✅ Fixed
Bounded 8-worker pool for HEAD verification (channel-based, not O(n) goroutines) ✅ Fixed
404 vs 500 distinction in admin action handlers (writeModelRegistryStoreError) ✅ Fixed
Publishing key DB failures return 500 not 401 (FindPublishingAPIKeysWithError) ✅ Fixed
Status preserved on upsert (status excluded from ON CONFLICT UPDATE clause) ✅ Fixed
Case-insensitive path collision detection (strings.ToLower in seenPaths map) ✅ Fixed
loadModelRegistryFiles checks rows.Err() after iteration ✅ Fixed
ListActiveModelRegistryWithError propagates errors; catalog sync failures preserve existing catalog ✅ Fixed
Provider model inventories preserved across catalog updates (fd79e1d) ✅ Fixed
Aggregate SHA-256 recomputed from per-file hashes during registration ✅ Fixed
publish-model.sh uses Python ThreadPool, not xargs sh -c ✅ Fixed

Remaining Issues

P2 — GET /v1/models/catalog/{id} returns 404 for deprecated/retired models

GetModelRegistryRecord uses activeModelRegistryQuery which filters mr.status IN ('active', 'beta') (postgres_model_registry.go:273-283). Querying a deprecated model returns pgx.ErrNoRows, which maps to "model not found" (line 197) — the same 404 as a nonexistent model. Operators debugging why a model disappeared from routing have no way to distinguish "this model ID doesn't exist" from "this model exists but is deprecated." Consider adding a separate GetModelRegistryRecordAny query that doesn't filter by status for the catalog item endpoint.

Fix this →

P2 — SyncModelCatalog failure after successful registration not surfaced to caller

handleRegisterModel (model_registry_handlers.go:152) calls s.SyncModelCatalog() and returns 200 OK regardless of whether the catalog sync succeeded. If the DB becomes unavailable between SetModelVersion and SyncModelCatalog, the response says "registered" but providers won't route to the model until the next manual sync or restart. This is logged but invisible to the caller.

This is a known trade-off in distributed systems, but worth documenting — the 200 response guarantees storage, not routing availability. The existing SyncModelCatalog error logging helps incident response.

P2 — PromoteModelVersion doesn't check version status before promoting

postgres_model_registry.go:112-138: The SQL queries for the version ID and inserts into model_active_versions without verifying the version has status = 'ready'. In practice, SetModelVersion always writes status = 'ready', but if a version were later retired via a direct SQL operation, it could still be promoted. Consider adding AND status = 'ready' to the SELECT at line 123.

P2 — verifyManifestFiles HEAD requests have no retry

model_registry_handlers.go:480-519: A transient network failure or R2 eventual consistency lag on a single file will cause the entire registration to fail with no retry. A missing Content-Length already logs a warning (line 542) but network errors propagate immediately. Consider wrapping verifyManifestFileHEAD in a simple 3-attempt retry with exponential backoff for transient errors (5xx/network), similar to the Swift downloader's retry loop.

P3 — validRegistryIdentifier has no max-length check

model_registry_handlers.go:423-437: Model IDs and versions can be arbitrarily long. An ID of 10,000 characters would pass validation and generate a slug+hash prefix like v2/aaaa...--deadbeef012/version, which may exceed R2 object key limits (1024 bytes) or DB column widths. A len(value) > 255 (or similar) guard is cheap to add.

P3 — unmarshalMetadata silently drops corrupted JSON

postgres_model_registry.go:344-352: When a runtime_parameters or metadata column contains invalid JSON (e.g., from a direct DB edit), unmarshalMetadata returns an empty map without logging the error. The model appears to have no metadata/parameters. Consider logging the error at WARN level so corrupted rows are observable in production without failing the request.

P3 — constantTimeStringEqual leaks key length via early exit

model_registry_handlers.go:640-645: The function returns false immediately on length mismatch, leaking the expected key length to a timing side channel. For publishing API keys this is low risk (they're not authentication secrets in the same way as passwords), and subtle.ConstantTimeCompare handles the same-length case correctly. Worth noting for completeness — it's acceptable as-is but could be upgraded to always call ConstantTimeCompare on a fixed-length hash instead.


Swift Provider — Download Path

The staged-download and hash-before-rename pattern is now correct. A few observations:

P3 — publishStagedSnapshot TOCTOU is acceptable

ModelCatalog.swift:716-723: The fileExists → replaceItemAt sequence has a tiny TOCTOU window. If cacheDir is deleted between the two calls, replaceItemAt throws, completed stays false, and the defer cleans up the staging dir. The existing model is preserved on error. This is acceptable; the caller retries the full download on next invocation.

P3 — Orphaned .local-staging-* dirs on crash

If the process crashes after stagingDir is created (line 426) but before completed = true (line 469), the staging dir is orphaned in snapshotsDir. These accumulate silently. Consider adding startup cleanup of stale .local-staging-* dirs older than a configurable TTL (e.g., 24h).


Test Coverage

The test suite is thorough for the key invariants:

  • TestRegisterModelHandlerPromotesActiveRecord: end-to-end via httptest with a real CDN mock ✓
  • TestModelCatalogFallbackAndRegistryPreference: registry preference over legacy catalog ✓
  • TestModelRegistryListErrorSurfacesAndDoesNotFallback: DB failures return 500, catalog preserved ✓
  • TestPublishingAPIKeyStoreErrorSurfacesButBootstrapStillWorks: 500 on DB error, bootstrap bypass ✓
  • TestRegisteringNewVersionPreservesRetiredStatus: lifecycle status preserved on re-registration ✓
  • TestUpsertModelRegistryEntryPreservesExistingStatus: upsert doesn't reset status ✓
  • TestModelRegistryNotFoundClassification: 404 vs 500 discrimination ✓
  • TestValidateModelManifestRejectsTraversalAndBadHashes: all edge cases including case-insensitive paths ✓

One gap: There's no test for the GET /v1/models/catalog/{id} endpoint returning 404 vs 200 for deprecated models — but this is the P2 issue noted above, so the test absence is consistent with the behavior being untested by design.


Verdict: LGTM with minor issues

The four previous review rounds have addressed all critical and important findings. The remaining P2 items (GetModelRegistryRecord 404 for deprecated models, HEAD verification retry, promote status check) are real but low-risk in production given current usage patterns. The P3 items are cosmetic or defensive-depth additions.

The bounded worker pool, aggregate hash recomputation, staged snapshot, disk space pre-check, error code taxonomy, status preservation, and provider inventory preservation are all correctly implemented and tested. The PR is in mergeable shape.

@github-actions

github-actions Bot commented May 24, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark Results

Runner: macos-15 (M1 Virtual) | Date: 2026-05-24 18:57 UTC

1-provider-streaming

1 providers, 1 users, 30 requests, concurrency=5, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 30
Success 4
Errors 26
Total Duration 3.916s
Throughput 1.0 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 1.746s 1.746s 1.747s 1.747s
parse 4 26µs 22µs 47µs 47µs
reserve 4 4ms 4ms 6ms 6ms
route 4 22µs 18µs 43µs 43µs
encrypt 4 534µs 553µs 558µs 558µs
dispatch 4 37µs 44µs 52µs 52µs
coordinator_to_provider 4 1.735s 1.736s 1.738s 1.738s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=25.75µs (threshold=1ms)
parse:p95<=5ms PASS p95=47µs (threshold=5ms)
reserve:mean<=50ms PASS mean=4.1095ms (threshold=50ms)
reserve:p95<=200ms PASS p95=5.752ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=534.25µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=558µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=37.25µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=52µs (threshold=50ms)

1-provider-non-streaming

1 providers, 1 users, 20 requests, concurrency=5, streaming=false

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 20
Success 4
Errors 16
Total Duration 2.252s
Throughput 1.8 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 2.249s 2.25s 2.252s 2.252s
parse 4 52µs 33µs 125µs 125µs
reserve 4 6ms 6ms 8ms 8ms
route 4 17µs 14µs 26µs 26µs
encrypt 4 779µs 748µs 938µs 938µs
dispatch 4 39µs 51µs 53µs 53µs
coordinator_to_provider 4 1.643s 1.644s 1.645s 1.645s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=51.5µs (threshold=1ms)
parse:p95<=5ms PASS p95=125µs (threshold=5ms)
reserve:mean<=50ms PASS mean=5.51475ms (threshold=50ms)
reserve:p95<=200ms PASS p95=7.926ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=779.25µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=938µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=38.5µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=53µs (threshold=50ms)

7-provider-multi-model

7 providers, 5 users, 50 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 4 0.5 GB
mlx-community/gemma-3-270m-4bit 3 0.2 GB
Metric Value
Total Requests 50
Success 43
Errors 7
Total Duration 9.907s
Throughput 4.3 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 43 714ms 4ms 3.689s 3.693s
parse 41 17µs 16µs 27µs 67µs
reserve 41 1ms 1ms 3ms 4ms
route 41 23µs 19µs 60µs 86µs
encrypt 43 430µs 393µs 649µs 745µs
dispatch 43 36µs 30µs 62µs 148µs
coordinator_to_provider 43 593ms 1ms 3.653s 3.688s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=17.39µs (threshold=1ms)
parse:p95<=5ms PASS p95=27µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.48878ms (threshold=50ms)
reserve:p95<=200ms PASS p95=3.14ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=430.186µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=649µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=36.186µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=62µs (threshold=50ms)

3-provider-high-concurrency

3 providers, 10 users, 60 requests, concurrency=20, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 60
Success 12
Errors 48
Total Duration 3.813s
Throughput 3.1 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 12 2.343s 2.345s 2.381s 2.381s
parse 12 41µs 18µs 288µs 288µs
reserve 12 4ms 6ms 7ms 7ms
route 12 17µs 12µs 42µs 42µs
encrypt 12 1ms 0s 2ms 2ms
dispatch 12 32µs 28µs 85µs 85µs
coordinator_to_provider 12 2.33s 2.335s 2.37s 2.37s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=41µs (threshold=1ms)
parse:p95<=5ms PASS p95=288µs (threshold=5ms)
reserve:mean<=50ms PASS mean=4.464083ms (threshold=50ms)
reserve:p95<=200ms PASS p95=6.627ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=639.666µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=2.188ms (threshold=50ms)
dispatch:mean<=5ms PASS mean=32.083µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=85µs (threshold=50ms)

1-provider-queue-saturation

1 providers, 10 users, 40 requests, concurrency=15, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 40
Success 4
Errors 36
Total Duration 2.774s
Throughput 1.4 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 1.944s 1.944s 1.944s 1.944s
parse 4 16µs 17µs 20µs 20µs
reserve 4 2ms 2ms 3ms 3ms
route 4 14µs 14µs 21µs 21µs
encrypt 4 471µs 475µs 493µs 493µs
dispatch 4 21µs 16µs 39µs 39µs
coordinator_to_provider 4 1.938s 1.938s 1.938s 1.938s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=15.75µs (threshold=1ms)
parse:p95<=5ms PASS p95=20µs (threshold=5ms)
reserve:mean<=50ms PASS mean=2.152ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.61ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=471µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=493µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=20.75µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=39µs (threshold=50ms)

3-provider-20-users

3 providers, 20 users, 60 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 60
Success 60
Errors 0
Total Duration 5.67s
Throughput 10.6 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 60 392ms 5ms 2.347s 2.348s
parse 60 23µs 16µs 32µs 329µs
reserve 60 1ms 1ms 3ms 3ms
route 60 17µs 16µs 38µs 51µs
encrypt 60 0s 0s 1ms 1ms
dispatch 60 31µs 28µs 65µs 74µs
coordinator_to_provider 60 389ms 3ms 2.339s 2.341s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=22.766µs (threshold=1ms)
parse:p95<=5ms PASS p95=32µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.305966ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.821ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=380.066µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=620µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=31.4µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=65µs (threshold=50ms)

1-provider-scaling

1 providers, 5 users, 30 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 1 0.5 GB
Metric Value
Total Requests 30
Success 4
Errors 26
Total Duration 3.092s
Throughput 1.3 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 4 2.099s 2.1s 2.1s 2.1s
parse 4 14µs 14µs 18µs 18µs
reserve 4 2ms 2ms 2ms 2ms
route 4 19µs 21µs 31µs 31µs
encrypt 4 491µs 577µs 577µs 577µs
dispatch 4 46µs 46µs 84µs 84µs
coordinator_to_provider 4 2.094s 2.094s 2.095s 2.095s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=13.5µs (threshold=1ms)
parse:p95<=5ms PASS p95=18µs (threshold=5ms)
reserve:mean<=50ms PASS mean=2.21325ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.329ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=490.75µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=577µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=46.25µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=84µs (threshold=50ms)

3-provider-scaling

3 providers, 5 users, 30 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 30
Success 30
Errors 0
Total Duration 3.849s
Throughput 7.8 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 30 713ms 6ms 2.16s 2.16s
parse 30 16µs 14µs 28µs 32µs
reserve 30 2ms 1ms 3ms 4ms
route 30 13µs 12µs 27µs 28µs
encrypt 30 434µs 393µs 840µs 966µs
dispatch 30 24µs 22µs 50µs 62µs
coordinator_to_provider 30 709ms 4ms 2.153s 2.153s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=15.966µs (threshold=1ms)
parse:p95<=5ms PASS p95=28µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.524266ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.995ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=434.166µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=840µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=24.2µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=50µs (threshold=50ms)

5-provider-scaling

5 providers, 5 users, 30 requests, concurrency=10, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 5 0.5 GB
Metric Value
Total Requests 30
Success 30
Errors 0
Total Duration 4.159s
Throughput 7.2 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 30 757ms 4ms 2.313s 2.313s
parse 30 15µs 14µs 24µs 28µs
reserve 30 1ms 1ms 3ms 4ms
route 30 17µs 17µs 26µs 28µs
encrypt 30 403µs 391µs 597µs 786µs
dispatch 30 27µs 26µs 62µs 71µs
coordinator_to_provider 30 754ms 1ms 2.305s 2.307s

Assertion Report: PASS

Assertion Result Detail
parse:mean<=1ms PASS mean=15.3µs (threshold=1ms)
parse:p95<=5ms PASS p95=24µs (threshold=5ms)
reserve:mean<=50ms PASS mean=1.461966ms (threshold=50ms)
reserve:p95<=200ms PASS p95=2.616ms (threshold=200ms)
encrypt:mean<=5ms PASS mean=402.7µs (threshold=5ms)
encrypt:p95<=50ms PASS p95=597µs (threshold=50ms)
dispatch:mean<=5ms PASS mean=27.466µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=62µs (threshold=50ms)

3-provider-heavy-100conc-10kb

3 providers, 20 users, 100 requests, concurrency=100, streaming=true

Model Providers RAM
mlx-community/Qwen3.5-0.8B-MLX-4bit 3 0.5 GB
Metric Value
Total Requests 100
Success 12
Errors 88
Total Duration 5m0.004s
Throughput 0.0 req/s

Latency Decomposition

Segment Count Mean P50 P95 Max
total_e2e 12 2.216s 2.202s 2.247s 2.247s
parse 12 70µs 72µs 90µs 90µs
reserve 12 7ms 7ms 8ms 8ms
route 12 16µs 13µs 33µs 33µs
encrypt 12 19ms 19ms 20ms 20ms
dispatch 12 47µs 45µs 94µs 94µs
coordinator_to_provider 12 2.177s 2.163s 2.207s 2.207s

Assertion Report: FAIL

Assertion Result Detail
parse:mean<=1ms PASS mean=69.833µs (threshold=1ms)
parse:p95<=5ms PASS p95=90µs (threshold=5ms)
reserve:mean<=50ms PASS mean=7.307333ms (threshold=50ms)
reserve:p95<=200ms PASS p95=7.746ms (threshold=200ms)
encrypt:mean<=5ms FAIL mean=19.019416ms (threshold=5ms)
encrypt:p95<=50ms PASS p95=19.552ms (threshold=50ms)
dispatch:mean<=5ms PASS mean=47.083µs (threshold=5ms)
dispatch:p95<=50ms PASS p95=94µs (threshold=50ms)

@Gajesh2007
Gajesh2007 merged commit 50e8887 into master May 24, 2026
17 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c2c29ec2ce

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +538 to +540
if resp.ContentLength >= 0 && resp.ContentLength != file.SizeBytes {
return fmt.Errorf("HEAD %s content length %d != manifest size %d", file.Path, resp.ContentLength, file.SizeBytes)
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Verify remote file digests during registration

verifyManifestFileHEAD only checks HTTP success and Content-Length, so registration can accept artifacts whose bytes do not match manifest.files[].sha256 (for example, a corrupted or overwritten object with the same size). In that case the version is stored/promotable as ready, but providers will later fail SHA/aggregate verification at download time, leaving a catalog entry that cannot be deployed.

Useful? React with 👍 / 👎.

Comment on lines +2908 to +2910
catalogModels := s.store.ListSupportedModels()
catalogByID = make(map[string]store.SupportedModel, len(catalogModels))
for _, cm := range catalogModels {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Enforce empty catalog as deny-all in model listing

When ListActiveModelRegistryWithError() returns no rows and legacy supported_models is also empty (fresh DB state), catalogByID stays empty in this fallback branch. Because filtering later only excludes non-catalog models when len(catalogByID) > 0, /v1/models can still return provider-advertised models even though routing is deny-all, which misleads clients into selecting models that are not actually routable.

Useful? React with 👍 / 👎.

Comment thread scripts/publish-model.sh
trap 'rm -f "$MANIFEST"' EXIT

printf 'Hashing model into manifest...\n'
(cd "$ROOT_DIR/provider-swift" && swift run -c release darkbloom-publish hash "$MODEL_DIR" --id "$MODEL_ID" --version "$VERSION" -o "$MANIFEST")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Resolve model directory before changing working directory

The script validates MODEL_DIR before changing directories, but the hashing step runs inside provider-swift and reuses the raw MODEL_DIR string. If the operator enters a relative path (for example ./snapshot), validation can pass in the caller’s cwd and then fail at swift run ... hash because the same relative path is interpreted from provider-swift, breaking the publish flow for otherwise valid inputs.

Useful? React with 👍 / 👎.

This branch was successfully deployed

3 active deployments
Preview – d-inference — c2c29ec2 Deployed May 24, 2026 by vercel[bot]
Preview – d-inference-console-ui-dev — c2c29ec2 Deployed May 24, 2026 by vercel[bot]
Preview – d-inference-landing — c2c29ec2 Deployed May 24, 2026 by vercel[bot]
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.

2 participants