chore(ms-ai-architect): refresh KB critical-bucket — 15 files [skip-docs]

KB-currency refresh (critical priority, 2026-06-19) via /architect:kb-update.
15 critical cost/arkitektur-filer re-verifisert mot Microsoft Learn (MCP).

Hovedendringer:
- Azure AI Search Serverless (Preview) prismodell (rag-cost, rag-query,
  vector-storage, rag-enterprise-scale)
- Agentic retrieval GA-split (2026-04-01 REST GA, portal preview) + Foundry IQ
- AI gateway multi-provider (Anthropic v2 / Google Vertex), unified model API
  (preview), Foundry-integrasjon (enterprise-arch, ai-services-cost,
  multi-model, cost-tracking)
- FOCUS-skjema + Cost Mgmt -> ADLS Gen2 -> Fabric -> Power BI pipeline
  (cost-management, cost-allocation)
- FinOps hub AI-agent via Azure MCP / Copilot Studio (budget-forecasting)
- OTel trace-based sampling for logs (observability)
- Korreksjoner: semantic-cache score-threshold = AVSTAND (0.15, ikke 0.85
  cosine-likhet); llm-emit-token-metric maks 5 custom dimensions;
  Foundry RBAC-renames (Owner/Contributor = kun mgmt); Researcher/Analyst er
  ikke agenter
- Alle 15 Last updated -> 2026-06-19

High-bucket (49 filer) UTSATT til egen sesjon (operatoer-valg).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01REiKFhP4w6xGXXqWKpPCJJ
This commit is contained in:
Kjell Tore Guttormsen 2026-06-19 06:22:48 +02:00
commit 41b390b38d
15 changed files with 69 additions and 30 deletions

View file

@ -1,6 +1,6 @@
# Cost Tracking & Chargeback via APIM Policies
**Last updated:** 2026-02
**Last updated:** 2026-06-19
**Status:** GA
**Category:** API Management & AI Gateway
@ -42,12 +42,9 @@ Den primære policyen for å emittere token-metriker til Azure Monitor:
<outbound>
<base />
<llm-emit-token-metric namespace="ai-cost-metrics">
<!-- Dimensjoner for kostnadsallokering -->
<!-- Maks 5 custom dimensions per policy (Azure Monitor-grense) -->
<dimension name="Subscription" value="@(context.Subscription.Name)" />
<dimension name="API" value="@(context.Api.Name)" />
<dimension name="Product" value="@(context.Product.Name)" />
<dimension name="ClientIP" value="@(context.Request.IpAddress)" />
<dimension name="Region" value="@(context.Deployment.Region)" />
<dimension name="UserId"
value="@(context.Request.Headers.GetValueOrDefault("X-User-Id", "unknown"))" />
<dimension name="Department"
@ -58,6 +55,8 @@ Den primære policyen for å emittere token-metriker til Azure Monitor:
</outbound>
```
**Viktig (MCP 2026-06):** `llm-emit-token-metric` tillater **maks 5 custom dimensions per policy** (Azure Monitor-grense — 5 default-dimensjoner brukes allerede av tjenesten; eksempelet over er derfor trimmet fra 8 til 5). Flere dimensjoner gir policy-feil. Policyen konfigureres i **inbound**-seksjonen og virker for OpenAI Chat Completions/Responses, **Anthropic Messages API** (API Management v2-tiers) og **Google Vertex AI**. Token-kategoriene inkluderer nå (preview) også cached-, reasoning- og thinking-tokens i tillegg til prompt/completion/total. Sett `include_usage=true` ved streaming, ellers blir token-tellingen unøyaktig.
### Token-typer og Kostnader
| Token-type | Beskrivelse | Kostnadsandel |