chore: import upstream snapshot with attribution
Deploy local.promptfoo.app / Deploy to Cloudflare Pages (push) Waiting to run
Test and Publish Multi-arch Docker Image / test (push) Waiting to run
Test and Publish Multi-arch Docker Image / build-docker-and-push-digests (map[digest-suffix:linux-amd64 platform:linux/amd64 runner:ubuntu-latest]) (push) Blocked by required conditions
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) Blocked by required conditions
Test and Publish Multi-arch Docker Image / merge-docker-digests (push) Blocked by required conditions
Test and Publish Multi-arch Docker Image / Attest Multi-arch Image (push) Blocked by required conditions
Validate Renovate Config / Validate Renovate Configuration (push) Waiting to run
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

This commit is contained in:
wehub-resource-sync
2026-07-13 13:24:08 +08:00
commit 0d3cb498a3
5438 changed files with 1316560 additions and 0 deletions
+53
View File
@@ -0,0 +1,53 @@
# provider-github-models (GitHub Models Provider)
You can run this example with:
```bash
npx promptfoo@latest init --example provider-github-models
cd provider-github-models
```
## Setup
Set your `GITHUB_TOKEN` environment variable. You can create a Personal Access Token at https://github.com/settings/tokens.
```bash
export GITHUB_TOKEN=ghp_your_token_here
```
## What This Tests
This example tests the GitHub Models API integration:
1. **Direct Provider Usage**: Uses GitHub Models as the main provider (gpt-4o-mini and gpt-5-mini)
2. **GitHub as Grader**: Uses GitHub Models for `llm-rubric` assertions via the `defaultTest.options.provider.text` configuration
## Run the Evaluation
```bash
promptfoo eval
```
## View Results
```bash
promptfoo view
```
## Available Models
GitHub Models supports various models including:
**OpenAI Models:**
- `github:openai/gpt-4o`, `github:openai/gpt-4o-mini`
- `github:openai/gpt-5`, `github:openai/gpt-5-mini`, `github:openai/gpt-5-nano`
- `github:openai/o4-mini`, `github:openai/o3-mini`
**Other Providers:**
- `github:meta/llama-4-scout-17b-16e-instruct`
- `github:deepseek/DeepSeek-V3-0324`
- `github:mistral-ai/mistral-large`
See the [GitHub Models marketplace](https://github.com/marketplace?type=models) for the full list.
@@ -0,0 +1,44 @@
# yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
description: 'GitHub Models Provider Test'
prompts:
- 'What is the capital of {{country}}?'
providers:
- id: github:openai/gpt-4o-mini
config:
temperature: 0
- id: github:openai/gpt-5-mini
config:
temperature: 0
defaultTest:
options:
provider:
text: github:openai/gpt-4o-mini
tests:
- vars:
country: France
assert:
- type: contains
value: Paris
- type: llm-rubric
value: 'The response correctly identifies Paris as the capital of France'
- vars:
country: Japan
assert:
- type: contains
value: Tokyo
- type: llm-rubric
value: 'The response correctly identifies Tokyo as the capital of Japan'
- vars:
country: Australia
assert:
- type: contains
value: Canberra
- type: llm-rubric
value: 'The response correctly identifies Canberra as the capital of Australia'