# 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
"""Minimal entry point for microsoft-foundry model conformance testing.
Usage:
genkit dev:test-model --from-file model-conformance.yaml -- uv run conformance_entry.py
Env:
AZURE_OPENAI_API_KEY: Required. Azure OpenAI API key.
AZURE_OPENAI_ENDPOINT: Required. Azure OpenAI endpoint URL.
"""
import asyncio
import os
from genkit.ai import Genkit
from genkit.plugins.microsoft_foundry import MicrosoftFoundry
ai = Genkit(
plugins=[
MicrosoftFoundry(
api_key=os.environ['AZURE_OPENAI_API_KEY'],
endpoint=os.environ['AZURE_OPENAI_ENDPOINT'],
)
],
)
async def main() -> None:
"""Keep the process alive for the test runner."""
await asyncio.Event().wait()
if __name__ == '__main__':
ai.run_main(main())