Skip to content

Commit 98971d8

Browse files
fix(learning): correct MODEL_ENDPOINT to the concrete serving-endpoint form
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 `<model>/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 <e.wang@databricks.com>
1 parent b367a62 commit 98971d8

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

.github/workflows/engineer-bot-learning.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,15 @@ jobs:
9999
env:
100100
GH_TOKEN: ${{ steps.prelude.outputs.token }}
101101
GITHUB_REPOSITORY: ${{ github.repository }}
102-
# Only the `<workspace>/serving-endpoints/` prefix matters:
103-
# sdk_agent.translate_endpoint rewrites this to `.../serving-endpoints/anthropic`
104-
# and discards the model path segment. The effective model comes from
105-
# .bot/config.yaml `retrospective.model` (or the engine default).
106-
MODEL_ENDPOINT: https://${{ secrets.DATABRICKS_HOST }}/serving-endpoints/anthropic/invocations
102+
# Use the concrete `.../serving-endpoints/<model>/invocations` form (same
103+
# as reviewer-bot.yml / engineer-bot.yml). sdk_agent.translate_endpoint
104+
# strips it to the `.../serving-endpoints/anthropic` base the CLI needs.
105+
# Do NOT use `.../serving-endpoints/anthropic/invocations` here: that hits
106+
# translate_endpoint's already-v2 early-return, which keeps the trailing
107+
# `invocations`, so the CLI appends `/v1/messages` →
108+
# `.../anthropic/invocations/v1/messages` → HTTP 400 (unsupported path).
109+
# The effective model is set by the engine default (no retrospective.model).
110+
MODEL_ENDPOINT: https://${{ secrets.DATABRICKS_HOST }}/serving-endpoints/databricks-claude-opus-4-8/invocations
107111
DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }}
108112
RUNNER_TEMP: ${{ runner.temp }}
109113
SINCE: ${{ inputs.since }}

0 commit comments

Comments
 (0)