From c8dc7260cedba62d0322f94c20e9f72e57b2f1df Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 11 May 2026 16:22:11 +0000 Subject: [PATCH 1/3] Plan documentation for AWF /reflect route Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- docs/src/content/docs/agent-factory-status.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/src/content/docs/agent-factory-status.mdx b/docs/src/content/docs/agent-factory-status.mdx index b7ed66068e2..ac26fbfb24f 100644 --- a/docs/src/content/docs/agent-factory-status.mdx +++ b/docs/src/content/docs/agent-factory-status.mdx @@ -16,8 +16,9 @@ These are experimental agentic workflows used by the GitHub Next team to learn, | [Agent Performance Analyzer - Meta-Orchestrator](https://github.com/github/gh-aw/blob/main/.github/workflows/agent-performance-analyzer.md) | copilot | [![Agent Performance Analyzer - Meta-Orchestrator](https://github.com/github/gh-aw/actions/workflows/agent-performance-analyzer.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/agent-performance-analyzer.lock.yml) | - | - | | [Agent Persona Explorer](https://github.com/github/gh-aw/blob/main/.github/workflows/agent-persona-explorer.md) | copilot | [![Agent Persona Explorer](https://github.com/github/gh-aw/actions/workflows/agent-persona-explorer.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/agent-persona-explorer.lock.yml) | - | - | | [Agentic Workflow Audit Agent](https://github.com/github/gh-aw/blob/main/.github/workflows/audit-workflows.md) | claude | [![Agentic Workflow Audit Agent](https://github.com/github/gh-aw/actions/workflows/audit-workflows.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/audit-workflows.lock.yml) | - | - | +| [Agentic Workflow Portfolio Yield](https://github.com/github/gh-aw/blob/main/.github/workflows/aw-portfolio-yield.md) | copilot | [![Agentic Workflow Portfolio Yield](https://github.com/github/gh-aw/actions/workflows/aw-portfolio-yield.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/aw-portfolio-yield.lock.yml) | - | - | | [AI Moderator](https://github.com/github/gh-aw/blob/main/.github/workflows/ai-moderator.md) | codex | [![AI Moderator](https://github.com/github/gh-aw/actions/workflows/ai-moderator.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/ai-moderator.lock.yml) | - | - | -| [Approach Validator](https://github.com/github/gh-aw/blob/main/.github/workflows/approach-validator.md) | claude | [![Approach Validator](https://github.com/github/gh-aw/actions/workflows/approach-validator.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/approach-validator.lock.yml) | - | - | +| [Approach Validator](https://github.com/github/gh-aw/blob/main/.github/workflows/approach-validator.md) | claude | [![Approach Validator](https://github.com/github/gh-aw/actions/workflows/approach-validator.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/approach-validator.lock.yml) | - | `/approach` | | [Archie](https://github.com/github/gh-aw/blob/main/.github/workflows/archie.md) | copilot | [![Archie](https://github.com/github/gh-aw/actions/workflows/archie.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/archie.lock.yml) | - | `/archie` | | [Architecture Diagram Generator](https://github.com/github/gh-aw/blob/main/.github/workflows/daily-architecture-diagram.md) | copilot | [![Architecture Diagram Generator](https://github.com/github/gh-aw/actions/workflows/daily-architecture-diagram.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/daily-architecture-diagram.lock.yml) | - | - | | [Architecture Guardian](https://github.com/github/gh-aw/blob/main/.github/workflows/architecture-guardian.md) | copilot | [![Architecture Guardian](https://github.com/github/gh-aw/actions/workflows/architecture-guardian.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/architecture-guardian.lock.yml) | - | - | @@ -146,6 +147,7 @@ These are experimental agentic workflows used by the GitHub Next team to learn, | [Mergefest](https://github.com/github/gh-aw/blob/main/.github/workflows/mergefest.md) | copilot | [![Mergefest](https://github.com/github/gh-aw/actions/workflows/mergefest.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/mergefest.lock.yml) | - | `/mergefest` | | [Metrics Collector - Infrastructure Agent](https://github.com/github/gh-aw/blob/main/.github/workflows/metrics-collector.md) | copilot | [![Metrics Collector - Infrastructure Agent](https://github.com/github/gh-aw/actions/workflows/metrics-collector.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/metrics-collector.lock.yml) | - | - | | [Multi-Device Docs Tester](https://github.com/github/gh-aw/blob/main/.github/workflows/daily-multi-device-docs-tester.md) | claude | [![Multi-Device Docs Tester](https://github.com/github/gh-aw/actions/workflows/daily-multi-device-docs-tester.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/daily-multi-device-docs-tester.lock.yml) | - | - | +| [Necromancer](https://github.com/github/gh-aw/blob/main/.github/workflows/necromancer.md) | codex | [![Necromancer](https://github.com/github/gh-aw/actions/workflows/necromancer.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/necromancer.lock.yml) | - | - | | [Organization Health Report](https://github.com/github/gh-aw/blob/main/.github/workflows/org-health-report.md) | copilot | [![Organization Health Report](https://github.com/github/gh-aw/actions/workflows/org-health-report.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/org-health-report.lock.yml) | - | - | | [Package Specification Enforcer](https://github.com/github/gh-aw/blob/main/.github/workflows/spec-enforcer.md) | claude | [![Package Specification Enforcer](https://github.com/github/gh-aw/actions/workflows/spec-enforcer.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/spec-enforcer.lock.yml) | - | - | | [Package Specification Extractor](https://github.com/github/gh-aw/blob/main/.github/workflows/spec-extractor.md) | copilot | [![Package Specification Extractor](https://github.com/github/gh-aw/actions/workflows/spec-extractor.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/spec-extractor.lock.yml) | - | - | From 91d63473478acfde0ccc314e1fc3ae1c2b16db96 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 11 May 2026 16:23:34 +0000 Subject: [PATCH 2/3] Add AWF reflect route documentation page Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- docs/astro.config.mjs | 1 + .../src/content/docs/reference/awf-reflect.md | 58 +++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 docs/src/content/docs/reference/awf-reflect.md diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs index 7bcdfc67e2e..a7cfa5e10fc 100644 --- a/docs/astro.config.mjs +++ b/docs/astro.config.mjs @@ -324,6 +324,7 @@ export default defineConfig({ { label: 'Audit', link: '/reference/audit/' }, { label: 'Authentication', link: '/reference/auth/' }, { label: 'Authentication (Projects)', link: '/reference/auth-projects/' }, + { label: 'AWF Reflect Route', link: '/reference/awf-reflect/' }, { label: 'Cache Memory', link: '/reference/cache-memory/' }, { label: 'Command Triggers', link: '/reference/command-triggers/' }, { label: 'Compilation Process', link: '/reference/compilation-process/' }, diff --git a/docs/src/content/docs/reference/awf-reflect.md b/docs/src/content/docs/reference/awf-reflect.md new file mode 100644 index 00000000000..9606fd610e5 --- /dev/null +++ b/docs/src/content/docs/reference/awf-reflect.md @@ -0,0 +1,58 @@ +--- +title: AWF Reflect Route +description: Use the AWF /reflect route to discover gateway inference endpoints and available models at runtime. +sidebar: + order: 1355 +--- + +The AWF API proxy exposes `GET /reflect` on `http://api-proxy:10000/reflect` inside the AWF runtime network. + +Use this route when building shared workflows, tools, or extensions that need runtime model routing. + +## Why use `/reflect` + +`/reflect` returns the currently configured inference providers and their model availability for the active run. This allows a shared workflow or tool to: + +- discover which gateway endpoints are available +- check whether each endpoint is configured +- read or refresh model availability +- select a provider/model dynamically at runtime + +Do not hardcode direct upstream model API URLs in shared workflow logic. + +> [!IMPORTANT] +> All inference requests should go through the AWF gateway. Avoid calling model providers directly outside the gateway so usage remains controllable and observable for cost control, tracking, and optimization. + +## Response shape + +The response includes an `endpoints` array and a `models_fetch_complete` flag: + +- `endpoints[].provider`: provider identifier (for example `openai`, `anthropic`, `copilot`, `gemini`) +- `endpoints[].base_url`: gateway base URL for inference calls +- `endpoints[].configured`: whether credentials/config are present for that provider +- `endpoints[].models`: discovered model IDs, or `null` when not yet available +- `endpoints[].models_url`: gateway URL used to query models for that provider +- `models_fetch_complete`: whether startup model discovery is complete + +## Recommended selection flow for shared tools + +1. Query `/reflect` at start of execution. +2. Filter endpoints to `configured: true`. +3. Prefer endpoints with a non-empty `models` list. +4. Match requested model aliases/patterns against available models. +5. Route inference to the selected endpoint `base_url`. +6. If `models` is `null`, treat availability as temporary and retry discovery before failing. + +This keeps shared tooling portable across repositories and environments where available providers differ. + +## Example request + +```bash +curl -s http://api-proxy:10000/reflect +``` + +## Related Documentation + +- [MCP Gateway](/gh-aw/reference/mcp-gateway/) +- [Cost Management](/gh-aw/reference/cost-management/) +- [Model Aliases & Multipliers](/gh-aw/reference/model-tables/) From 5f7ec34dc0bf599de493b0adb1b8139d55bc04d5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 11 May 2026 16:29:38 +0000 Subject: [PATCH 3/3] Refine AWF reflect docs and drop unrelated generated diff Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .../src/content/docs/agent-factory-status.mdx | 4 +--- .../src/content/docs/reference/awf-reflect.md | 20 +++++++++---------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/docs/src/content/docs/agent-factory-status.mdx b/docs/src/content/docs/agent-factory-status.mdx index ac26fbfb24f..b7ed66068e2 100644 --- a/docs/src/content/docs/agent-factory-status.mdx +++ b/docs/src/content/docs/agent-factory-status.mdx @@ -16,9 +16,8 @@ These are experimental agentic workflows used by the GitHub Next team to learn, | [Agent Performance Analyzer - Meta-Orchestrator](https://github.com/github/gh-aw/blob/main/.github/workflows/agent-performance-analyzer.md) | copilot | [![Agent Performance Analyzer - Meta-Orchestrator](https://github.com/github/gh-aw/actions/workflows/agent-performance-analyzer.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/agent-performance-analyzer.lock.yml) | - | - | | [Agent Persona Explorer](https://github.com/github/gh-aw/blob/main/.github/workflows/agent-persona-explorer.md) | copilot | [![Agent Persona Explorer](https://github.com/github/gh-aw/actions/workflows/agent-persona-explorer.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/agent-persona-explorer.lock.yml) | - | - | | [Agentic Workflow Audit Agent](https://github.com/github/gh-aw/blob/main/.github/workflows/audit-workflows.md) | claude | [![Agentic Workflow Audit Agent](https://github.com/github/gh-aw/actions/workflows/audit-workflows.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/audit-workflows.lock.yml) | - | - | -| [Agentic Workflow Portfolio Yield](https://github.com/github/gh-aw/blob/main/.github/workflows/aw-portfolio-yield.md) | copilot | [![Agentic Workflow Portfolio Yield](https://github.com/github/gh-aw/actions/workflows/aw-portfolio-yield.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/aw-portfolio-yield.lock.yml) | - | - | | [AI Moderator](https://github.com/github/gh-aw/blob/main/.github/workflows/ai-moderator.md) | codex | [![AI Moderator](https://github.com/github/gh-aw/actions/workflows/ai-moderator.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/ai-moderator.lock.yml) | - | - | -| [Approach Validator](https://github.com/github/gh-aw/blob/main/.github/workflows/approach-validator.md) | claude | [![Approach Validator](https://github.com/github/gh-aw/actions/workflows/approach-validator.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/approach-validator.lock.yml) | - | `/approach` | +| [Approach Validator](https://github.com/github/gh-aw/blob/main/.github/workflows/approach-validator.md) | claude | [![Approach Validator](https://github.com/github/gh-aw/actions/workflows/approach-validator.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/approach-validator.lock.yml) | - | - | | [Archie](https://github.com/github/gh-aw/blob/main/.github/workflows/archie.md) | copilot | [![Archie](https://github.com/github/gh-aw/actions/workflows/archie.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/archie.lock.yml) | - | `/archie` | | [Architecture Diagram Generator](https://github.com/github/gh-aw/blob/main/.github/workflows/daily-architecture-diagram.md) | copilot | [![Architecture Diagram Generator](https://github.com/github/gh-aw/actions/workflows/daily-architecture-diagram.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/daily-architecture-diagram.lock.yml) | - | - | | [Architecture Guardian](https://github.com/github/gh-aw/blob/main/.github/workflows/architecture-guardian.md) | copilot | [![Architecture Guardian](https://github.com/github/gh-aw/actions/workflows/architecture-guardian.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/architecture-guardian.lock.yml) | - | - | @@ -147,7 +146,6 @@ These are experimental agentic workflows used by the GitHub Next team to learn, | [Mergefest](https://github.com/github/gh-aw/blob/main/.github/workflows/mergefest.md) | copilot | [![Mergefest](https://github.com/github/gh-aw/actions/workflows/mergefest.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/mergefest.lock.yml) | - | `/mergefest` | | [Metrics Collector - Infrastructure Agent](https://github.com/github/gh-aw/blob/main/.github/workflows/metrics-collector.md) | copilot | [![Metrics Collector - Infrastructure Agent](https://github.com/github/gh-aw/actions/workflows/metrics-collector.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/metrics-collector.lock.yml) | - | - | | [Multi-Device Docs Tester](https://github.com/github/gh-aw/blob/main/.github/workflows/daily-multi-device-docs-tester.md) | claude | [![Multi-Device Docs Tester](https://github.com/github/gh-aw/actions/workflows/daily-multi-device-docs-tester.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/daily-multi-device-docs-tester.lock.yml) | - | - | -| [Necromancer](https://github.com/github/gh-aw/blob/main/.github/workflows/necromancer.md) | codex | [![Necromancer](https://github.com/github/gh-aw/actions/workflows/necromancer.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/necromancer.lock.yml) | - | - | | [Organization Health Report](https://github.com/github/gh-aw/blob/main/.github/workflows/org-health-report.md) | copilot | [![Organization Health Report](https://github.com/github/gh-aw/actions/workflows/org-health-report.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/org-health-report.lock.yml) | - | - | | [Package Specification Enforcer](https://github.com/github/gh-aw/blob/main/.github/workflows/spec-enforcer.md) | claude | [![Package Specification Enforcer](https://github.com/github/gh-aw/actions/workflows/spec-enforcer.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/spec-enforcer.lock.yml) | - | - | | [Package Specification Extractor](https://github.com/github/gh-aw/blob/main/.github/workflows/spec-extractor.md) | copilot | [![Package Specification Extractor](https://github.com/github/gh-aw/actions/workflows/spec-extractor.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/spec-extractor.lock.yml) | - | - | diff --git a/docs/src/content/docs/reference/awf-reflect.md b/docs/src/content/docs/reference/awf-reflect.md index 9606fd610e5..b5fc1b92094 100644 --- a/docs/src/content/docs/reference/awf-reflect.md +++ b/docs/src/content/docs/reference/awf-reflect.md @@ -5,7 +5,7 @@ sidebar: order: 1355 --- -The AWF API proxy exposes `GET /reflect` on `http://api-proxy:10000/reflect` inside the AWF runtime network. +Inside the AWF runtime network, the AWF API proxy exposes `GET /reflect` at `http://api-proxy:10000/reflect`. Use this route when building shared workflows, tools, or extensions that need runtime model routing. @@ -13,24 +13,22 @@ Use this route when building shared workflows, tools, or extensions that need ru `/reflect` returns the currently configured inference providers and their model availability for the active run. This allows a shared workflow or tool to: -- discover which gateway endpoints are available -- check whether each endpoint is configured -- read or refresh model availability -- select a provider/model dynamically at runtime - -Do not hardcode direct upstream model API URLs in shared workflow logic. +- Discover which gateway endpoints are available +- Check whether each endpoint is configured +- Read or refresh model availability +- Select a provider/model dynamically at runtime > [!IMPORTANT] -> All inference requests should go through the AWF gateway. Avoid calling model providers directly outside the gateway so usage remains controllable and observable for cost control, tracking, and optimization. +> Do not hardcode direct upstream model API URLs in shared workflow logic. All inference requests should go through the AWF gateway so usage remains controllable and observable for cost control, tracking, and optimization. ## Response shape The response includes an `endpoints` array and a `models_fetch_complete` flag: -- `endpoints[].provider`: provider identifier (for example `openai`, `anthropic`, `copilot`, `gemini`) +- `endpoints[].provider`: provider identifier (e.g., `openai`, `anthropic`, `copilot`, `gemini`) - `endpoints[].base_url`: gateway base URL for inference calls - `endpoints[].configured`: whether credentials/config are present for that provider -- `endpoints[].models`: discovered model IDs, or `null` when not yet available +- `endpoints[].models`: discovered model IDs, or `null` when model discovery is not yet complete - `endpoints[].models_url`: gateway URL used to query models for that provider - `models_fetch_complete`: whether startup model discovery is complete @@ -41,7 +39,7 @@ The response includes an `endpoints` array and a `models_fetch_complete` flag: 3. Prefer endpoints with a non-empty `models` list. 4. Match requested model aliases/patterns against available models. 5. Route inference to the selected endpoint `base_url`. -6. If `models` is `null`, treat availability as temporary and retry discovery before failing. +6. If `models` is `null`, retry discovery with bounded backoff (for example, every 3 seconds up to 5 attempts) before failing. This keeps shared tooling portable across repositories and environments where available providers differ.