Files
promptfoo--promptfoo/examples/azure-mai/promptfooconfig.yaml
T
wehub-resource-sync 0d3cb498a3
CI / Shell Format Check (push) Has been cancelled
CI / Check Ruby (3.4) (push) Has been cancelled
CI / CI Config (push) Has been cancelled
CI / Test on Node ${{ matrix.node }} and ${{ matrix.os }}${{ matrix.shard && format(' (shard {0}/3)', matrix.shard) || '' }} (push) Has been cancelled
CI / Build on Node ${{ matrix.node }} (push) Has been cancelled
CI / Style Check (push) Has been cancelled
CI / Generate Assets (push) Has been cancelled
CI / Check Python (3.14) (push) Has been cancelled
CI / Check Python (3.9) (push) Has been cancelled
CI / Build Docs (push) Has been cancelled
CI / Code Scan Action (push) Has been cancelled
CI / Site tests (push) Has been cancelled
CI / webui tests (push) Has been cancelled
CI / Run Integration Tests (push) Has been cancelled
CI / Run Smoke Tests (push) Has been cancelled
CI / Go Tests (push) Has been cancelled
CI / Share Test (push) Has been cancelled
CI / Redteam (Production API) (push) Has been cancelled
CI / Redteam (Staging API) (push) Has been cancelled
CI / GitHub Actions Lint (push) Has been cancelled
CI / Check Ruby (3.0) (push) Has been cancelled
release-please / release-please (push) Has been cancelled
release-please / build (push) Has been cancelled
release-please / publish-npm (push) Has been cancelled
release-please / publish-npm-backfill (push) Has been cancelled
release-please / docker (push) Has been cancelled
release-please / publish-code-scan-action (push) Has been cancelled
release-please / attest-code-scan-action (push) Has been cancelled
Deploy local.promptfoo.app / Deploy to Cloudflare Pages (push) Has been cancelled
Test and Publish Multi-arch Docker Image / test (push) Has been cancelled
Test and Publish Multi-arch Docker Image / build-docker-and-push-digests (map[digest-suffix:linux-amd64 platform:linux/amd64 runner:ubuntu-latest]) (push) Has been cancelled
Test and Publish Multi-arch Docker Image / build-docker-and-push-digests (map[digest-suffix:linux-arm64 platform:linux/arm64 runner:ubuntu-24.04-arm]) (push) Has been cancelled
Test and Publish Multi-arch Docker Image / merge-docker-digests (push) Has been cancelled
Test and Publish Multi-arch Docker Image / Attest Multi-arch Image (push) Has been cancelled
Validate Renovate Config / Validate Renovate Configuration (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:24:08 +08:00

64 lines
2.7 KiB
YAML

# yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
description: Microsoft MAI models on Azure AI Foundry (Foundry Models sold by Azure)
# Microsoft's first-party "MAI" model family. Image models (MAI-Image-2.5 and
# friends, currently Preview) use a Microsoft-managed `/mai/v1/images` route and
# run through the dedicated `azure:image:<deployment>` provider — that's what this
# example uses. Text/reasoning models (MAI-DS-R1, MAI-Thinking-1, MAI-Code-1-Flash)
# use the standard chat-completions API via `azure:chat:<deployment>`, but have
# limited availability today (see the commented chat provider below).
#
# Setup:
# 1. Deploy an MAI image model to a Microsoft Foundry (AIServices) resource:
# az cognitiveservices account deployment create \
# --name <RESOURCE> --resource-group <RG> \
# --deployment-name mai-image-2-5 \
# --model-name MAI-Image-2.5 --model-format Microsoft \
# --model-version 2026-06-02 --sku-name GlobalStandard --sku-capacity 1
# 2. Point promptfoo at the resource's *.services.ai.azure.com endpoint:
# export AZURE_API_HOST=<RESOURCE>.services.ai.azure.com
# export AZURE_API_KEY=<key> # or use `az login` (Entra ID)
# 3. Run: promptfoo eval --no-cache
prompts:
- '{{prompt}}'
providers:
- id: azure:image:mai-image-2-5
label: MAI-Image-2.5
config:
# `model` is used only for cost reporting; Azure deployment names can't
# contain the dot in "MAI-Image-2.5", so name the model id explicitly.
model: MAI-Image-2.5
width: 1024
height: 1024
# Reasoning/chat MAI models use the standard chat provider, but aren't deployable
# on most subscriptions yet (MAI-DS-R1 is deprecated; MAI-Thinking-1 and
# MAI-Code-1-Flash are private preview). Uncomment once your subscription can
# deploy one:
# - id: azure:chat:mai-thinking-1
# label: MAI-Thinking-1
# config:
# max_completion_tokens: 2048
tests:
- vars:
prompt: A photorealistic red cube on a clean white background, studio lighting
assert:
# The provider returns a base64 PNG. promptfoo stores large base64 media as
# a blob reference (promptfoo://blob/...) before assertions run, so accept
# either the blob ref or an inline data URL.
- type: javascript
value: |
return typeof output === 'string' &&
(output.startsWith('promptfoo://blob/') || output.startsWith('data:image/'));
- vars:
prompt: An isometric illustration of a cozy reading nook with warm lighting
assert:
- type: javascript
value: |
return typeof output === 'string' &&
(output.startsWith('promptfoo://blob/') || output.startsWith('data:image/'));