From 98971d8c2acfdce432fd52cd243dd356246d084c Mon Sep 17 00:00:00 2001 From: eric-wang-1990 Date: Wed, 12 Aug 2026 22:46:12 -0700 Subject: [PATCH] fix(learning): correct MODEL_ENDPOINT to the concrete serving-endpoint form MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The learning workflow set MODEL_ENDPOINT to `.../serving-endpoints/anthropic/invocations`. That is NOT translated the way the old comment claimed: sdk_agent.translate_endpoint has an early-return for URLs already containing `/serving-endpoints/anthropic`, which keeps the trailing `/invocations` — so the CLI appends `/v1/messages` and calls `.../serving-endpoints/anthropic/invocations/v1/messages`, which the gateway rejects with `400 Unsupported native API path`. Proof: databricks-sql-python's learning cron (same endpoint form) has failed every scheduled run with exactly this 400. The reviewer-bot flagged it on the sibling PRs (Low), and it is the real cause. Use the concrete `.../serving-endpoints/databricks-claude-opus-4-8/invocations` form that reviewer-bot.yml / engineer-bot.yml already use successfully: translate_endpoint strips `/invocations` to the `.../serving-endpoints/ anthropic` base the CLI needs. Comment corrected to explain the trap. Co-authored-by: Isaac Signed-off-by: eric-wang-1990 --- .github/workflows/engineer-bot-learning.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/engineer-bot-learning.yml b/.github/workflows/engineer-bot-learning.yml index 620a2f8dc..7fba45a67 100644 --- a/.github/workflows/engineer-bot-learning.yml +++ b/.github/workflows/engineer-bot-learning.yml @@ -99,11 +99,15 @@ jobs: env: GH_TOKEN: ${{ steps.prelude.outputs.token }} GITHUB_REPOSITORY: ${{ github.repository }} - # Only the `/serving-endpoints/` prefix matters: - # sdk_agent.translate_endpoint rewrites this to `.../serving-endpoints/anthropic` - # and discards the model path segment. The effective model comes from - # .bot/config.yaml `retrospective.model` (or the engine default). - MODEL_ENDPOINT: https://${{ secrets.DATABRICKS_HOST }}/serving-endpoints/anthropic/invocations + # Use the concrete `.../serving-endpoints//invocations` form (same + # as reviewer-bot.yml / engineer-bot.yml). sdk_agent.translate_endpoint + # strips it to the `.../serving-endpoints/anthropic` base the CLI needs. + # Do NOT use `.../serving-endpoints/anthropic/invocations` here: that hits + # translate_endpoint's already-v2 early-return, which keeps the trailing + # `invocations`, so the CLI appends `/v1/messages` → + # `.../anthropic/invocations/v1/messages` → HTTP 400 (unsupported path). + # The effective model is set by the engine default (no retrospective.model). + MODEL_ENDPOINT: https://${{ secrets.DATABRICKS_HOST }}/serving-endpoints/databricks-claude-opus-4-8/invocations DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }} RUNNER_TEMP: ${{ runner.temp }} SINCE: ${{ inputs.since }}