From 1f338576d7a322b654dfda454aa6a17d5ea8a903 Mon Sep 17 00:00:00 2001 From: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com> Date: Wed, 6 May 2026 14:12:19 -0700 Subject: [PATCH 1/3] [CI] Cap Claude workflow runs at 10 minutes GitHub's default job timeout is 360 minutes, which is far too long for a Claude review or interactive Q&A run. A stuck or runaway action would otherwise burn 6 hours of runner time and proxy quota before being cancelled. 10 minutes is well above the typical review duration observed in similar workflows (Megatron-LM, Megatron-Bridge). Co-Authored-By: Claude Opus 4.7 (1M context) Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com> --- .github/workflows/claude.yml | 1 + .github/workflows/claude_review.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index e600d6ae8ba..2f1e65bd6be 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -52,6 +52,7 @@ jobs: ) ) runs-on: ubuntu-latest + timeout-minutes: 10 permissions: contents: read pull-requests: write diff --git a/.github/workflows/claude_review.yml b/.github/workflows/claude_review.yml index 336c0ca01f4..95ae1cd8001 100644 --- a/.github/workflows/claude_review.yml +++ b/.github/workflows/claude_review.yml @@ -23,6 +23,7 @@ jobs: contains(github.event.comment.body, '/claude review') && contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association) runs-on: ubuntu-latest + timeout-minutes: 10 permissions: contents: read pull-requests: write From ece0b6835ceb0a1e8e8c8d5af9136fc286bf5eb8 Mon Sep 17 00:00:00 2001 From: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com> Date: Wed, 6 May 2026 14:16:47 -0700 Subject: [PATCH 2/3] [CI] Disable experimental betas to avoid proxy 400 The NVIDIA inference proxy (LiteLLM-based) does not accept the `context_management` field that Claude Code's SDK sends by default, returning HTTP 400 with `Extra inputs are not permitted`. Setting CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 strips beta-only fields from outgoing requests so the proxy accepts them. Long-term fix is on the proxy side (forward the anthropic-beta header / accept newer fields); this env-var works around it without losing functionality we currently use. Co-Authored-By: Claude Opus 4.7 (1M context) Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com> --- .github/workflows/claude.yml | 5 +++++ .github/workflows/claude_review.yml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index 2f1e65bd6be..069afe801b4 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -68,6 +68,11 @@ jobs: uses: anthropics/claude-code-action@v1 env: ANTHROPIC_BASE_URL: ${{ secrets.ANTHROPIC_BASE_URL }} + # The NVIDIA inference proxy (LiteLLM-based) rejects the + # `context_management` field that Claude Code's SDK sends by + # default. Disabling experimental betas drops this field so + # the proxy accepts the request. + CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS: "1" with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} claude_args: | diff --git a/.github/workflows/claude_review.yml b/.github/workflows/claude_review.yml index 95ae1cd8001..cbda34091b0 100644 --- a/.github/workflows/claude_review.yml +++ b/.github/workflows/claude_review.yml @@ -60,6 +60,11 @@ jobs: uses: anthropics/claude-code-action@v1 env: ANTHROPIC_BASE_URL: ${{ secrets.ANTHROPIC_BASE_URL }} + # The NVIDIA inference proxy (LiteLLM-based) rejects the + # `context_management` field that Claude Code's SDK sends by + # default. Disabling experimental betas drops this field so + # the proxy accepts the request. + CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS: "1" with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} trigger_phrase: "/claude review" From 17efe1ae721571d0a27af4acd1bda77f36fc9b69 Mon Sep 17 00:00:00 2001 From: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com> Date: Wed, 6 May 2026 14:25:25 -0700 Subject: [PATCH 3/3] [CI] Also disable prompt caching for NVIDIA inference proxy NVIDIA/OSMO's claude workflow (testbot-respond.yaml) sets BOTH CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 and DISABLE_PROMPT_CACHING=1 because the NVIDIA gateway rejects two fields the SDK sends by default: `context_management` (beta) and `cache_control.ephemeral.scope` (prompt caching). Adding the second env var preemptively so we don't hit a follow-up 400 after the first fix lands. Co-Authored-By: Claude Opus 4.7 (1M context) Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com> --- .github/workflows/claude.yml | 10 ++++++---- .github/workflows/claude_review.yml | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index 069afe801b4..ab5f4254b07 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -68,11 +68,13 @@ jobs: uses: anthropics/claude-code-action@v1 env: ANTHROPIC_BASE_URL: ${{ secrets.ANTHROPIC_BASE_URL }} - # The NVIDIA inference proxy (LiteLLM-based) rejects the - # `context_management` field that Claude Code's SDK sends by - # default. Disabling experimental betas drops this field so - # the proxy accepts the request. + # NVIDIA inference proxy (LiteLLM-based) rejects two fields + # the Claude Code SDK sends by default. Set per NVIDIA/OSMO's + # workflow which has hit and solved both issues: + # - `context_management` → disable experimental betas + # - `cache_control.ephemeral.scope` → disable prompt caching CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS: "1" + DISABLE_PROMPT_CACHING: "1" with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} claude_args: | diff --git a/.github/workflows/claude_review.yml b/.github/workflows/claude_review.yml index cbda34091b0..69119089fee 100644 --- a/.github/workflows/claude_review.yml +++ b/.github/workflows/claude_review.yml @@ -60,11 +60,13 @@ jobs: uses: anthropics/claude-code-action@v1 env: ANTHROPIC_BASE_URL: ${{ secrets.ANTHROPIC_BASE_URL }} - # The NVIDIA inference proxy (LiteLLM-based) rejects the - # `context_management` field that Claude Code's SDK sends by - # default. Disabling experimental betas drops this field so - # the proxy accepts the request. + # NVIDIA inference proxy (LiteLLM-based) rejects two fields + # the Claude Code SDK sends by default. Set per NVIDIA/OSMO's + # workflow which has hit and solved both issues: + # - `context_management` → disable experimental betas + # - `cache_control.ephemeral.scope` → disable prompt caching CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS: "1" + DISABLE_PROMPT_CACHING: "1" with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} trigger_phrase: "/claude review"