import weflayr
from weflayr.openapi.models import ArchiveRoutingStrategyInput
client = weflayr.client() # reads WEFLAYR_API_KEY
client.archive_routing_strategy(body=ArchiveRoutingStrategyInput.from_dict({
"slug": "summarize-profile-router",
}))
const weflayr = require('weflayr');
const client = weflayr.client(); // reads WEFLAYR_API_KEY
await weflayr.api.archiveRoutingStrategy({
client,
throwOnError: true,
body: {
slug: 'summarize-profile-router',
},
});
curl -X POST https://app.weflayr.com/api/routing-strategy-archive/ \
-H "Authorization: Bearer $WEFLAYR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"slug": "summarize-profile-router"
}'
{
"slug": "summarize-profile-router",
"version": 1,
"document": {
"name": "Summarize profile router",
"slug": "summarize-profile-router",
"allowed_deployments": [
{
"model": "gpt-6-luna",
"provider": "openai",
"region": "GLOBAL",
"reasoning_effort": null
},
{
"model": "claude-sonnet-5-5",
"provider": "anthropic",
"region": "GLOBAL",
"reasoning_effort": null
}
],
"global_rule": "same_quality_lowest_cost",
"switch_from_cached_model_or_cheaper_better_model_condition": "same_or_better_quality_is_unlikely",
"fallback": {
"retry_attempts": 0,
"strategy": "default"
},
"override_rules": [],
"self_heal": true,
"apply_auto_caching_from_benchmark": false,
"benchmark_source": {
"benchmark_uuid": "7b0f3f0e-5d8e-4a57-9d52-0a3f6a2c1e11"
}
},
"archived_at": "2026-10-23T08:00:00+00:00",
"updated_at": "2026-10-20T09:30:00+00:00",
"url": "https://app.weflayr.com/dashboard/routing-strategies/?strategy=summarize-profile-router",
"blockers": [
"The strategy is archived: the AI gateway refuses calls that send 'strategy/summarize-profile-router'."
]
}
{"error": "Invalid or missing API key. Send it as \"Authorization: Bearer <your key>\"."}
{"error": "No routing strategy has the slug 'nope'. List the project's strategies, archived ones included, with get_routing_strategies (status=all)."}
{"error": "Invalid request payload.", "detail": [{"field": "slug", "error": "Field required"}]}
Routing strategies
Archive routing strategy
Archive a routing strategy.
POST
/
api
/
routing-strategy-archive
/
import weflayr
from weflayr.openapi.models import ArchiveRoutingStrategyInput
client = weflayr.client() # reads WEFLAYR_API_KEY
client.archive_routing_strategy(body=ArchiveRoutingStrategyInput.from_dict({
"slug": "summarize-profile-router",
}))
const weflayr = require('weflayr');
const client = weflayr.client(); // reads WEFLAYR_API_KEY
await weflayr.api.archiveRoutingStrategy({
client,
throwOnError: true,
body: {
slug: 'summarize-profile-router',
},
});
curl -X POST https://app.weflayr.com/api/routing-strategy-archive/ \
-H "Authorization: Bearer $WEFLAYR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"slug": "summarize-profile-router"
}'
{
"slug": "summarize-profile-router",
"version": 1,
"document": {
"name": "Summarize profile router",
"slug": "summarize-profile-router",
"allowed_deployments": [
{
"model": "gpt-6-luna",
"provider": "openai",
"region": "GLOBAL",
"reasoning_effort": null
},
{
"model": "claude-sonnet-5-5",
"provider": "anthropic",
"region": "GLOBAL",
"reasoning_effort": null
}
],
"global_rule": "same_quality_lowest_cost",
"switch_from_cached_model_or_cheaper_better_model_condition": "same_or_better_quality_is_unlikely",
"fallback": {
"retry_attempts": 0,
"strategy": "default"
},
"override_rules": [],
"self_heal": true,
"apply_auto_caching_from_benchmark": false,
"benchmark_source": {
"benchmark_uuid": "7b0f3f0e-5d8e-4a57-9d52-0a3f6a2c1e11"
}
},
"archived_at": "2026-10-23T08:00:00+00:00",
"updated_at": "2026-10-20T09:30:00+00:00",
"url": "https://app.weflayr.com/dashboard/routing-strategies/?strategy=summarize-profile-router",
"blockers": [
"The strategy is archived: the AI gateway refuses calls that send 'strategy/summarize-profile-router'."
]
}
{"error": "Invalid or missing API key. Send it as \"Authorization: Bearer <your key>\"."}
{"error": "No routing strategy has the slug 'nope'. List the project's strategies, archived ones included, with get_routing_strategies (status=all)."}
{"error": "Invalid request payload.", "detail": [{"field": "slug", "error": "Field required"}]}
Every version is kept.
The response also carries
Changes live routing: the AI gateway refuses the calls that send an archived strategy’s
strategy/<slug> as their model.Parameters
Passed in the request body.string
required
The slug of the strategy to archive.
blockers (what prevents the usual next step), in plain words. It is empty when the usual workflow applies.
import weflayr
from weflayr.openapi.models import ArchiveRoutingStrategyInput
client = weflayr.client() # reads WEFLAYR_API_KEY
client.archive_routing_strategy(body=ArchiveRoutingStrategyInput.from_dict({
"slug": "summarize-profile-router",
}))
const weflayr = require('weflayr');
const client = weflayr.client(); // reads WEFLAYR_API_KEY
await weflayr.api.archiveRoutingStrategy({
client,
throwOnError: true,
body: {
slug: 'summarize-profile-router',
},
});
curl -X POST https://app.weflayr.com/api/routing-strategy-archive/ \
-H "Authorization: Bearer $WEFLAYR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"slug": "summarize-profile-router"
}'
{
"slug": "summarize-profile-router",
"version": 1,
"document": {
"name": "Summarize profile router",
"slug": "summarize-profile-router",
"allowed_deployments": [
{
"model": "gpt-6-luna",
"provider": "openai",
"region": "GLOBAL",
"reasoning_effort": null
},
{
"model": "claude-sonnet-5-5",
"provider": "anthropic",
"region": "GLOBAL",
"reasoning_effort": null
}
],
"global_rule": "same_quality_lowest_cost",
"switch_from_cached_model_or_cheaper_better_model_condition": "same_or_better_quality_is_unlikely",
"fallback": {
"retry_attempts": 0,
"strategy": "default"
},
"override_rules": [],
"self_heal": true,
"apply_auto_caching_from_benchmark": false,
"benchmark_source": {
"benchmark_uuid": "7b0f3f0e-5d8e-4a57-9d52-0a3f6a2c1e11"
}
},
"archived_at": "2026-10-23T08:00:00+00:00",
"updated_at": "2026-10-20T09:30:00+00:00",
"url": "https://app.weflayr.com/dashboard/routing-strategies/?strategy=summarize-profile-router",
"blockers": [
"The strategy is archived: the AI gateway refuses calls that send 'strategy/summarize-profile-router'."
]
}
{"error": "Invalid or missing API key. Send it as \"Authorization: Bearer <your key>\"."}
{"error": "No routing strategy has the slug 'nope'. List the project's strategies, archived ones included, with get_routing_strategies (status=all)."}
{"error": "Invalid request payload.", "detail": [{"field": "slug", "error": "Field required"}]}