You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add AI_AGENT fallback and sanitized passthrough for agent detection
Mirror databricks-sdk-go PR #1683 in the User-Agent agent detection.
Add AI_AGENT (the Vercel @vercel/detect-agent convention) as a secondary
fallback env var, consulted only when AGENT (the agents.md standard) is
unset or empty. AGENT takes precedence when both are non-empty. Explicit
product-specific env vars (CLAUDECODE, CURSOR_AGENT, etc.) still win over
both.
Change the fallback behavior so an unrecognized value is passed through
rather than coerced to "unknown". The raw value is sanitized to the
User-Agent allowlist (disallowed characters become "-") and capped at 64
characters. This applies to both AGENT and AI_AGENT.
Co-authored-by: Isaac
Copy file name to clipboardExpand all lines: NEXT_CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@
4
4
5
5
### New Features and Improvements
6
6
7
+
* Honor the Vercel `AI_AGENT=<name>` env var as a secondary fallback for AI agent detection in the User-Agent header (after the agents.md `AGENT=<name>` standard). Unrecognized fallback values now pass through the User-Agent sanitized and length-capped at 64 chars instead of being coerced to `agent/unknown`, so versioned variants such as `claude-code_2-1-141_agent` surface as-is.
0 commit comments