# new-api Route Key Validation (Minimal)

This project uses internal route keys (`heartbeat_fast`, `health_score_fast`) as the only model-facing values from bridge runtime.

## 1) Set env for bridge

PowerShell:

```powershell
$env:AGENTIC_OS_V3_NEWAPI_BASE_URL="https://<your-new-api-host>"
$env:AGENTIC_OS_V3_NEWAPI_KEY="<your-new-api-key>"
```

## 2) Run bridge

```powershell
99p bridge serve --listen=127.0.0.1:7810
```

## 3) Trigger health check

```powershell
Invoke-RestMethod -Method Post -Uri "http://127.0.0.1:7810/api/health/check"
```

Expected:
- response contains generic tier label (`fast_diagnostic`)
- no upstream provider/model name in API response
- event store has `health.checked` payload with `route_key=health_score_fast`

## 4) Verify route key reaches new-api

Run with temporary reverse proxy/logging on your new-api edge and confirm:
- HTTP header `x-99p-route-key: health_score_fast`
- request body contains:
  - `"model": "health_score_fast"`
  - `"metadata": {"route_key":"health_score_fast", ...}`

This confirms route key passthrough while keeping upstream model identity hidden from end users.

