Skip to main content
An A/B test splits the calls that send its strategy/<slug> as their model between two variants, A and B, by the share you set. Each variant sends its calls to a routing strategy (its live version, or one version you pin) or to one model. Each call goes to a variant at random, so one customer’s calls can reach both. You can also keep some customers out of the test: their calls always go to the target you set for them.
Create and change A/B tests on the dashboard’s A/B testing page, or with the management API (also accessible with the MCP server). Every save creates a new version, and you can restore an older one.

Call an A/B test

Call it the way you call a strategy, with its slug as the model: strategy/<slug>, or strategy/<slug>:<version> to pin one of its versions. A/B tests and strategies share the same slugs, so a slug names one or the other.

End a test

Weflayr never ends a test or picks a winner, and does not report the results of each variant yet. Once you have chosen a variant, change the model your code sends:
  • A variant sending its calls to a strategy: send that strategy’s strategy/<slug>, or strategy/<slug>:<version> if the variant pins a version.
  • A variant sending its calls to a model: send that model, with its provider and region.
Then archive the test: the gateway refuses the calls that still send its slug. A strategy that an A/B test sends calls to cannot be archived until the test is.