This was an excellent blog. I just wanted to add about the auto discover a modified policy below that might help others. This is doing Haiku, Sonnet, and Opus for the inbound policy. (Step 5)
<policies>
<inbound>
<base />
<return-response>
<set-status code="200" reason="OK" />
<set-header name="Content-Type" exists-action="override">
<value>application/json</value>
</set-header>
<set-body>@{
// Build the list of models Claude should discover.
var models = new JArray(
new JObject(
new JProperty("id", "claude-haiku-4-5"),
new JProperty("type", "model"),
new JProperty("display_name", "Claude Haiku 4.5"),
new JProperty("created_at", "2026-01-01T00:00:00Z")
),
new JObject(
new JProperty("id", "claude-sonnet-4-6"),
new JProperty("type", "model"),
new JProperty("display_name", "Claude Sonnet 4.6"),
new JProperty("created_at", "2026-05-28T00:00:00Z")
),
new JObject(
new JProperty("id", "claude-opus-4-8"),
new JProperty("type", "model"),
new JProperty("display_name", "Claude Opus 4.8"),
new JProperty("created_at", "2026-05-28T00:00:00Z")
)
);
// Compute first/last IDs from the array:
var firstId = (string)((JObject)models[0])["id"];
var lastId = (string)((JObject)models[models.Count - 1])["id"];
return new JObject(
new JProperty("data", models),
new JProperty("has_more", false),
new JProperty("first_id", firstId),
new JProperty("last_id", lastId)
).ToString();
}</set-body>
</return-response>
</inbound>
<backend>
<base />
</backend>
<outbound>
<base />
</outbound>
<on-error>
<base />
</on-error>
</policies>