fix(learning): repair MODEL_ENDPOINT 400 in the retrospective cron - #906
Merged
Conversation
…t 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>
eric-wang-1990
temporarily deployed
to
azure-prod
August 13, 2026 05:46 — with
GitHub Actions
Inactive
eric-wang-1990
temporarily deployed
to
azure-prod
August 13, 2026 05:46 — with
GitHub Actions
Inactive
There was a problem hiding this comment.
Pull request overview
Updates the engineer-bot learning (retrospective) GitHub Actions workflow to use the correct Databricks serving endpoint URL format so the engine/CLI endpoint translation produces a valid Anthropic native API base path and avoids the scheduled cron’s HTTP 400 failures.
Changes:
- Switch
MODEL_ENDPOINTinengineer-bot-learning.ymlfrom the problematic/serving-endpoints/anthropic/invocationsform to the concrete/serving-endpoints/databricks-claude-opus-4-8/invocationsform used by other bot workflows. - Expand inline workflow comments to document the endpoint-translation failure mode and the rationale for the concrete endpoint URL.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fix the
MODEL_ENDPOINTinengineer-bot-learning.yml:.../serving-endpoints/anthropic/invocations→.../serving-endpoints/databricks-claude-opus-4-8/invocations.Why (follow-up to #905)
#905 bumped the engine pin but merged before this endpoint fix landed — so the learning cron on
mainis still broken. The daily scheduled run fails every time with:Root cause:
sdk_agent.translate_endpointearly-returns on URLs already containing/serving-endpoints/anthropic, keeping the trailing/invocations. The CLI then appends/v1/messages, producing the rejected path. The concrete.../serving-endpoints/databricks-claude-opus-4-8/invocationsform (used byreviewer-bot.yml/engineer-bot.yml, which run successfully) is stripped bytranslate_endpointto the correct.../serving-endpoints/anthropicbase.The model segment in the URL is cosmetic — the effective model is engine-owned (
repo_conventions.engineer_bot_model()); this is a routing/base-URL fix only. Same fix is going out to the sibling driver repos' learning PRs.Validation
Post-merge, the daily cron should stop 400ing. Can be checked immediately with a manual
workflow_dispatch(recentsince).This pull request and its description were written by Isaac.