Skip to content

Stop emitting unsupported apiProxy.maxEffectiveTokens in generated AWF config#31117

Merged
pelikhan merged 2 commits into
mainfrom
copilot/aw-fix-dependabot-burner-failure
May 9, 2026
Merged

Stop emitting unsupported apiProxy.maxEffectiveTokens in generated AWF config#31117
pelikhan merged 2 commits into
mainfrom
copilot/aw-fix-dependabot-burner-failure

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 9, 2026

Bug Fix

Dependabot Burner on main failed because the generated awf-config.json included config.apiProxy.maxEffectiveTokens, which the current AWF runtime rejects as unsupported. Per issue guidance, this change disables writing that field until the feature is live.

  • What was the bug?

    • BuildAWFConfigJSON always serialized apiProxy.maxEffectiveTokens (default or configured override).
    • AWF config loading failed with: config.apiProxy.maxEffectiveTokens is not supported.
  • How did you fix it?

    • Removed MaxEffectiveTokens assignment from AWF config generation in pkg/workflow/awf_config.go.
    • Updated AWF config unit expectations in pkg/workflow/awf_config_test.go to assert the field is absent.
    • Updated affected wasm golden fixtures so generated workflow output no longer writes maxEffectiveTokens.
  • Example change

    // before
    apiProxy := &AWFAPIProxyConfig{
        Enabled:            true,
        MaxEffectiveTokens: maxEffectiveTokens,
    }
    
    // after
    apiProxy := &AWFAPIProxyConfig{
        Enabled: true,
    }

Copilot AI linked an issue May 9, 2026 that may be closed by this pull request
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Dependabot Burner workflow failure due to engine error Stop emitting unsupported apiProxy.maxEffectiveTokens in generated AWF config May 9, 2026
Copilot AI requested a review from pelikhan May 9, 2026 01:23
@pelikhan pelikhan marked this pull request as ready for review May 9, 2026 01:39
Copilot AI review requested due to automatic review settings May 9, 2026 01:39
@pelikhan pelikhan merged commit c37bfb6 into main May 9, 2026
@pelikhan pelikhan deleted the copilot/aw-fix-dependabot-burner-failure branch May 9, 2026 01:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Disables emitting the unsupported apiProxy.maxEffectiveTokens field when generating awf-config.json, to prevent AWF runtime config-load failures.

Changes:

  • Removed MaxEffectiveTokens assignment from BuildAWFConfigJSON’s apiProxy section.
  • Updated unit tests to assert maxEffectiveTokens is not present in generated config JSON.
  • Updated wasm compile golden fixtures to reflect the new generated config output (without maxEffectiveTokens).
Show a summary per file
File Description
pkg/workflow/awf_config.go Stops including apiProxy.maxEffectiveTokens in generated AWF config JSON.
pkg/workflow/awf_config_test.go Updates expectations to ensure maxEffectiveTokens is absent, including when configured.
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/with-imports.golden Updates expected generated workflow output to remove maxEffectiveTokens from embedded AWF config JSON.
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/smoke-copilot.golden Same golden update: remove maxEffectiveTokens.
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/playwright-cli-mode.golden Same golden update: remove maxEffectiveTokens.
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/basic-copilot.golden Same golden update: remove maxEffectiveTokens.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 6/6 changed files
  • Comments generated: 1

Comment on lines 246 to 250
// ── API proxy section ─────────────────────────────────────────────────────
maxEffectiveTokens := constants.DefaultMaxEffectiveTokens
if config.WorkflowData != nil && config.WorkflowData.EngineConfig != nil {
maxEffectiveTokens = config.WorkflowData.EngineConfig.GetMaxEffectiveTokens()
}
apiProxy := &AWFAPIProxyConfig{
Enabled: true,
MaxEffectiveTokens: maxEffectiveTokens,
Enabled: true,
}

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[aw] Dependabot Burner failed

3 participants