# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
# ---------------------------------------------------------------------------
# Conform tool configuration
# ---------------------------------------------------------------------------
# This file lives alongside the conformance spec directories and contains
# all repository-specific settings. The ``conform`` tool reads it via
# ``--config`` (or the wrapper script ``py/bin/conform`` passes it
# automatically).
#
# Paths are relative to this file's directory. The tool resolves them
# to absolute paths at load time.
[conform]
concurrency = 8
max-retries = 2
retry-base-delay = 1.0
test-concurrency = 3
# Plugins that are model providers but lack ``model_info.py`` (they use
# dynamic model registration). The ``check-model`` subcommand verifies
# that these have conformance specs too.
additional-model-plugins = ["google-genai", "vertex-ai", "ollama"]
# Required environment variables per plugin. An empty list means no
# credentials are needed (e.g. ollama uses a local server).
[conform.env]
amazon-bedrock = ["AWS_REGION"]
anthropic = ["ANTHROPIC_API_KEY"]
cloudflare-workers-ai = ["CLOUDFLARE_ACCOUNT_ID", "CLOUDFLARE_API_TOKEN"]
cohere = ["COHERE_API_KEY"]
compat-oai = ["OPENAI_API_KEY"]
deepseek = ["DEEPSEEK_API_KEY"]
google-genai = ["GEMINI_API_KEY"]
huggingface = ["HF_TOKEN"]
microsoft-foundry = ["AZURE_OPENAI_API_KEY", "AZURE_OPENAI_ENDPOINT"]
mistral = ["MISTRAL_API_KEY"]
ollama = []
vertex-ai = ["GOOGLE_CLOUD_PROJECT"]
xai = ["XAI_API_KEY"]
# ---------------------------------------------------------------------------
# Per-plugin overrides
# ---------------------------------------------------------------------------
# Override settings for specific plugins. Currently supports:
# test-concurrency — max parallel tests for this plugin (overrides global).
[conform.plugin-overrides.cloudflare-workers-ai]
test-concurrency = 1
# ---------------------------------------------------------------------------
# Runtime configurations
# ---------------------------------------------------------------------------
# Each runtime defines how to locate specs, plugins, and what command to use
# for running entry points. The --runtime CLI flag selects which runtime
# to use (default: python).
#
# Paths are relative to this file's directory.
[conform.runtimes.python]
cwd = "../../.."
entry-command = ["uv", "run", "--project", "py", "--active"]
plugins-dir = "../../plugins"
specs-dir = "."
[conform.runtimes.js]
cwd = "../../../js"
entry-command = ["npx", "tsx"]
plugins-dir = "../../../js/plugins"
specs-dir = "."
[conform.runtimes.go]
cwd = "../../../go"
entry-command = ["go", "run"]
plugins-dir = "../../../go/plugins"
specs-dir = "."