Repository navigation
Keep Claude custom request headers scoped to launch - #687
andy-xu-db wants to merge 30 commits into
Conversation
c85880d to
c65f808
Compare
b2ce76d to
cc94c21
Compare
cc94c21 to
635dad9
Compare
Live LiteSwap + Actual TUI Validation (2026-09-21)Validated the combined #610/#687 stack at Deployed a harmless AI Gateway marker change to
All four TUIs exited normally with code 0. Server marker evidence was collected at 22:18:49 UTC (Claude, request Scope limitation: staging smart-router selection returned HTTP 400 both with and without custom headers. The TUIs fell back successfully to their current models. This verifies actual inference header propagation through that fallback path, not a successful live smart-router model switch. MCP tool execution was not exercised. No additional header-code fix was needed. The temporary container/token were removed and LiteSwap teardown succeeded. The marker change was not added to these PRs. |
…261006 # Conflicts: # src/ucode/databricks.py
…261006 # Conflicts: # src/ucode/agents/__init__.py # tests/README.md # tests/integration/README.md # tests/test_cli.py
Reject a global `--header` on non-launch subcommands such as `configure`, which skipped per-agent validation and persisted header-scoped discovery. Propagate the header scope into skill and catalog worker threads, which otherwise sent their requests without it, and reject non-ASCII values before they fail during the request. Co-authored-by: Isaac <no-reply@databricks.com>
…eaders-claude Co-authored-by: Isaac <no-reply@databricks.com>
`ug configure` mirrors ug's headers into Claude Code's OS-managed settings, which take precedence over launch settings, so `--header` was rejected with a misleading "contact your administrator" message. Name ug as the source in that case, check managed-settings.d drop-ins, and report unreadable managed files instead of raising a traceback. Co-authored-by: Isaac <no-reply@databricks.com>
🥞 Stacked PR
Use this link to review incremental changes.
ug claude --header "Name: value"adds repeatable headers through a launch-only Claude settings override, preserving required headers without writing custom values into shared settings. The globalug --header ... claudeform uses the same implementation. Direct, smart-routing, and relayed launches compose this override with existing launch settings.Claude launches reject
--headerwhen OS-managed settings defineenv.ANTHROPIC_CUSTOM_HEADERS, including an empty value. That policy takes precedence over launch settings, so silently accepting the flag would not deliver the requested header. Existing private/admin header-name collisions are also rejected.Headers reach model discovery before Claude starts. Scoped model lists and defaults stay in the launch context. The obsolete global-header journal, cleanup, and recovery tests are removed; focused launch/policy/discovery tests cover the replacement behavior. Shared invocation handling, cache isolation, usage, and routing propagation come from #610.
Merged the updated #610, including
mainat7deeaf7a.Validation (2026-10-07):
uv run --frozen pytest -q --ignore=tests/test_e2e.py --ignore=tests/test_e2e_user_agent.py.git diff --checkpassed.Native-agent capture validation remains unverified: four Claude/Codex capture checks failed because no request reached the local capture server. Live LiteSwap validation was not completed. Component tests verify request construction and launch configuration; they do not establish a live agent or gateway pass.