SPB Git

Repository Public License

live-provider-smoke.md 4.8 KB 73 lines markdown

1<!--2ORIX OS Automation3File: docs/release/live-provider-smoke.md4Author: Simon-Pierre Boucher5Contact: contact@spboucher.ai6-->7# Live provider smoke tests89Results of the `Live*` suites of `Packages/ORIXProviderAdapters`, run against the real provider APIs with the10developer-only keys injected by `Scripts/test/with-dev-keys.sh`. No key, key fragment or account identifier appears in11this file, in the test output or in the repository.1213- **Date:** 2026-11-2114- **Command:** `Scripts/test/with-dev-keys.sh swift test` (from `Packages/ORIXProviderAdapters`; `--filter Live` runs the live suites alone)15- **Build:** debug (`DevEnvironmentCredentials` exists only under `#if DEBUG`; the release object has no such symbol)16- **Result:** 11 of 11 live tests passed; 57 mocked (`Fixture*`) tests passed in the same run17- **Kind of evidence:** live integration against the provider APIs from this Mac. Not a mocked result.1819## Results2021Latency is wall-clock for the whole test body after the model list was fetched (two requests for the round trips).22Token counts are the usage the provider reported, summed over the requests of the test.2324| Provider | Test | Model id | Latency | Input tokens | Output tokens | Cost reported by provider | Result |25|---|---|---|---|---|---|---|---|26| Anthropic | list models (15 listed, 15 priced from the registry) | n/a | 210 ms | n/a | n/a | n/a | pass |27| Anthropic | streamed text, cap 16 | `claude-haiku-5-5` | 491 ms | 16 | 4 | not reported | pass |28| Anthropic | forced tool call → tool result → final text, cap 64 | `claude-haiku-5-5` | 925 ms | 1071 | 53 | not reported | pass |29| Anthropic | tool round trip with thinking on, thinking block replayed, cap 400 | `claude-haiku-5-5` | 1501 ms | 1005 | 124 | not reported | pass |30| OpenAI | list models (41 chat models kept, 39 priced from the registry) | n/a | 642 ms | n/a | n/a | n/a | pass |31| OpenAI | streamed text, cap 16 | `gpt-4o-mini` | 461 ms | 14 | 2 | not reported | pass |32| OpenAI | forced tool call → tool result → final text, cap 64 | `gpt-4o-mini` | 1690 ms | 214 | 19 | not reported | pass |33| OpenRouter | list models (441 in the catalog, 433 with a fixed price) | n/a | 494 ms | n/a | n/a | n/a | pass |34| OpenRouter | streamed text, cap 16 | `openai/gpt-4o-mini` | 560 ms | 14 | 2 | US$0.000003 | pass |35| OpenRouter | forced tool call → tool result → final text, cap 64 | `openai/gpt-4o-mini` | 1688 ms | 214 | 19 | US$0.000044 | pass |36| OpenRouter | cost reporting (`usage.cost` → `TokenUsage.reportedCostUSD`) | `openai/gpt-4o-mini` | 500 ms | 14 | 1 | US$0.000003 | pass |3738## What each test checks3940- **List models:** the call succeeds, every entry carries the provider id, and the smoke model is present with a known price.41- **Streamed text:** text arrives as stream deltas, the stream ends with a stop event (`endTurn` or `maxTokens`), reported42  output tokens are above zero and within the cap.43- **Tool round trip:** a tool definition is sent with a forced tool choice; the streamed call is parsed and its input44  validates against the declared schema; the result is sent back; the final text uses the result (`42`).45- **Thinking replay (Anthropic):** with thinking left on, the signed thinking block that preceded the tool call is46  re-inserted by the adapter when the call is replayed, and the API accepts it. The run above recorded47  `thinking-blocks-replayed-and-accepted`. An earlier run at low effort did not exercise the path (the model called the48  tool without thinking), so the test prompt now needs a calculation first.4950## Cost5152| Provider | Basis | Cost of one full live run |53|---|---|---|54| Anthropic | 2,092 input and 181 output tokens at US$0.10 / US$0.50 per MTok (registry prices) | about US$0.0003 |55| OpenAI | 228 input and 21 output tokens at US$0.15 / US$0.60 per MTok (registry prices) | about US$0.00005 |56| OpenRouter | sum of the reported costs | US$0.00005 |5758One full run costs about US$0.0004. Everything run while developing the adapters on 2026-11-21 (two full runs and one59extra Anthropic round trip) comes to about US$0.001, against a budget of US$0.05.6061## Limits of this evidence6263- One model per provider was exercised. Other model ids are covered by the mocked suites and by the registry only.64- OpenRouter was exercised with an OpenAI upstream. Tool calling through other upstream providers was not run live.65- Not run live: prompt caching (the prompts are below every model's minimum cacheable size), structured outputs,66  image input, rate-limit and overload responses, and the retry wrapper. All of these have mocked tests only.67- The OpenAI Responses API is not used by this package, so nothing here speaks for it.6869## Running without keys7071Without the broker, each live test prints `SKIPPED(no ORIX_DEV_<PROVIDER>_API_KEY)` and returns: 11 skip lines72(4 Anthropic, 3 OpenAI, 4 OpenRouter), and the 57 mocked tests still run.73
Files main
Menu

Theme