Skip to content

[awf] api-proxy/copilot: COPILOT_PROVIDER_WIRE_API not set for GPT-5 models in BYOK/offline mode #2802

Closed

Description

@lpcox

Problem

Sandboxed engine: copilot workflows fail with GPT-5-family models because the AWF compiler injects COPILOT_API_KEY: dummy-byok-key-for-offline-mode to force BYOK/offline mode, but does not set COPILOT_PROVIDER_WIRE_API=responses. GPT-5 models require the responses API wire format; without it, all inference calls fail.

Context

Original issue: github/gh-aw#31241

Root Cause

In src/services/api-proxy-service.ts, when copilotApiKey is present the code sets COPILOT_OFFLINE=true and COPILOT_PROVIDER_BASE_URL but does not conditionally set COPILOT_PROVIDER_WIRE_API based on the selected COPILOT_MODEL. containers/api-proxy/providers/copilot.js forwards requests without enforcing the wire API version.

Proposed Solution

In src/services/api-proxy-service.ts, detect models that require the responses wire API (e.g. any gpt-5* model) via COPILOT_MODEL env var, and inject COPILOT_PROVIDER_WIRE_API=responses into the agent environment when applicable. Alternatively, always forward COPILOT_PROVIDER_WIRE_API from the outer workflow environment into the agent container.

Generated by Firewall Issue Dispatcher · ● 876.2K · ◷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions