diff --git a/.github/workflows/daily-model-inventory.lock.yml b/.github/workflows/daily-model-inventory.lock.yml index a25f8bf4061..0d69a14b8ca 100644 --- a/.github/workflows/daily-model-inventory.lock.yml +++ b/.github/workflows/daily-model-inventory.lock.yml @@ -1,4 +1,4 @@ -# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"87b8796f50d8b6c5fc7f8a01f7a709f304f576d6b7878ecbe911959aacc37911","body_hash":"7dcc9de641eb80bda11a7f2e673259f9863d64dc8df6fb2bfb3548f1addc913c","strict":true,"agent_id":"copilot","engine_versions":{"copilot":"1.0.68","copilot-sdk":"1.0.5"}} +# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"1a353da946770afe038544e0e69e4f3732124983e3734b7cf058b553bfa4056a","body_hash":"7dcc9de641eb80bda11a7f2e673259f9863d64dc8df6fb2bfb3548f1addc913c","strict":true,"agent_id":"copilot","engine_versions":{"copilot":"1.0.68","copilot-sdk":"1.0.5"}} # gh-aw-manifest: {"version":1,"secrets":["ANTHROPIC_API_KEY","COPILOT_GITHUB_TOKEN","GEMINI_API_KEY","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GH_AW_OTEL_GRAFANA_AUTHORIZATION","GH_AW_OTEL_GRAFANA_ENDPOINT","GH_AW_OTEL_SENTRY_AUTHORIZATION","GH_AW_OTEL_SENTRY_ENDPOINT","GITHUB_TOKEN","OPENAI_API_KEY"],"actions":[{"repo":"actions/cache/restore","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/cache/save","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/checkout","sha":"9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0","version":"v7.0.0"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.27.27","digest":"sha256:bb5a0150dcff1cddf9b8045bb411b7759806bace0abcb132fb22158073e155d9","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.27.27@sha256:bb5a0150dcff1cddf9b8045bb411b7759806bace0abcb132fb22158073e155d9"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.27","digest":"sha256:01e58c4383fa9952abe76e0a134a27c970f81f744d6b7861fc9e08b7964d94c3","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.27@sha256:01e58c4383fa9952abe76e0a134a27c970f81f744d6b7861fc9e08b7964d94c3"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.27.27","digest":"sha256:92d820df47b2eff75d93a5bec4dc183a3ec55ed7ddb4f25cb0fdda5c3e995409","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.27.27@sha256:92d820df47b2eff75d93a5bec4dc183a3ec55ed7ddb4f25cb0fdda5c3e995409"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.4.1","digest":"sha256:ad2a979c2cd8b50098e84938ca9c9c1580eb8e91526f101a90adfba7859b2c32","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.4.1@sha256:ad2a979c2cd8b50098e84938ca9c9c1580eb8e91526f101a90adfba7859b2c32"},{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:529d02eb970b1161aa25c593a9c3df57fdfad5a8add328cb3b6eccef66f3183b","pinned_image":"ghcr.io/github/gh-aw-node@sha256:529d02eb970b1161aa25c593a9c3df57fdfad5a8add328cb3b6eccef66f3183b"},{"image":"ghcr.io/github/github-mcp-server:v1.5.0","digest":"sha256:e25564dccc9110a70a77b9df560cbde11aa392fcb5f08b9abe5c4ebc6d146ea4","pinned_image":"ghcr.io/github/github-mcp-server:v1.5.0@sha256:e25564dccc9110a70a77b9df560cbde11aa392fcb5f08b9abe5c4ebc6d146ea4"}]} # This file was automatically generated by gh-aw. DO NOT EDIT. To debug this workflow, load the skill at https://github.com/github/gh-aw/blob/main/debug.md # @@ -153,6 +153,7 @@ jobs: GH_AW_INFO_FIREWALL_TYPE: "squid" GH_AW_INFO_FRONTMATTER_EMOJI: "📦" GH_AW_COMPILED_STRICT: "true" + GH_AW_INFO_MODEL_COSTS: '{"providers":{"openai":{"models":{"gpt-5-enterprise":{"cost":{"cache_read":"9.375e-07","cache_write":"3.75e-06","input":"3.75e-06","output":"1.5e-05"}}}}}}' GH_AW_INFO_FEATURES: '{"gh-aw-detection":true}' uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: diff --git a/.github/workflows/daily-model-inventory.md b/.github/workflows/daily-model-inventory.md index 1fb9fc8658b..b88232aa98f 100644 --- a/.github/workflows/daily-model-inventory.md +++ b/.github/workflows/daily-model-inventory.md @@ -26,6 +26,20 @@ network: - github - models.dev +# Supply pricing for a private/enterprise model not yet in the models.dev catalog. +# Cost values are per-token USD in scientific notation (e.g. 3e-06 = $3 per million tokens). +# Entries are merged with the built-in models.json at runtime and fill gaps for unknown models. +models: + providers: + openai: + models: + gpt-5-enterprise: + cost: + input: "3.75e-06" + output: "1.5e-05" + cache_read: "9.375e-07" + cache_write: "3.75e-06" + jobs: collect_openai_models: runs-on: ubuntu-latest diff --git a/docs/src/content/docs/reference/faq.md b/docs/src/content/docs/reference/faq.md index 15d5fc471ae..3cf670f7ef8 100644 --- a/docs/src/content/docs/reference/faq.md +++ b/docs/src/content/docs/reference/faq.md @@ -627,3 +627,35 @@ engine: claude ``` See [AI Engines](/gh-aw/reference/engines/). + +### How do I supply pricing for a custom or private model? + +gh-aw computes AI Credits (AIC) using pricing data from the [models.dev](https://models.dev/) catalog. If your workflow uses a custom, private, or enterprise model that isn't in the catalog — or if you want to override the built-in price — add a `models.providers` entry to your frontmatter: + +```yaml wrap +models: + providers: + openai: + models: + gpt-5-enterprise: + cost: + input: "3.75e-06" # $3.75 per million input tokens + output: "1.5e-05" # $15.00 per million output tokens + cache_read: "9.375e-07" # optional — omit if caching is not supported + cache_write: "3.75e-06" # optional +``` + +Cost values are **per-token USD in scientific notation** (e.g. `3.75e-06` = $0.00000375/token = $3.75 per million tokens). Omit `cache_read` and `cache_write` if the model doesn't support prompt caching. + +Use the provider key that matches your engine: + +| Engine | Provider key | +|---|---| +| `copilot` | `github-copilot` | +| `claude` | `anthropic` | +| `codex` | `openai` | +| `gemini` | `google` | + +These entries are **merged** with the built-in catalog at runtime — they override matching models and fill in gaps for unknown ones, so AIC accounting stays accurate. In shared workflows imported by others, `models.providers` entries merge as unions across all imports. + +See [Token Optimization — Capping Spend](/gh-aw/reference/cost-management/) for budgeting options alongside custom pricing.