diff --git a/src/ucode/cli.py b/src/ucode/cli.py index 624c18524..e1c1e281b 100644 --- a/src/ucode/cli.py +++ b/src/ucode/cli.py @@ -3278,6 +3278,12 @@ def _launch_tool( # lookup via resolve_gemini_provider_model (below), and uses no family model map. provider_models = None picker_catalog = None + # Custom OAuth setup (e.g. Isaac) authenticates a separate CLI profile. + catalog_profile = ( + state["custom_oauth"].get("profile") + if custom_oauth_cli_enabled(state.get("custom_oauth")) + else state.get("profile") + ) relayed = False coding_agent_config_defaults = ( managed_claude_family_models(managed) or {} @@ -3318,7 +3324,7 @@ def _launch_tool( ) ) if should_fetch_claude_picker_catalog: - token = get_databricks_token(state["workspace"], state.get("profile")) + token = get_databricks_token(state["workspace"], catalog_profile) picker_catalog = list_anthropic_model_catalog( state["workspace"], token, @@ -3405,7 +3411,7 @@ def _launch_tool( if tool == "claude" and managed is None and not provider and not parent_schema: discovered = list_anthropic_model_catalog( state["workspace"], - get_databricks_token(state["workspace"], state.get("profile")), + get_databricks_token(state["workspace"], catalog_profile), ) if discovered.model_ids: picker_catalog = claude_agent.default_model_picker_catalog( diff --git a/tests/README.md b/tests/README.md index 17c67b403..790238836 100644 --- a/tests/README.md +++ b/tests/README.md @@ -217,6 +217,10 @@ Codex browser-login component tests cover invalid refresh tokens, token-only std network errors, and reuse of a concurrent sign-in within the timeout. Codex config tests cover the helper flag; real browser consent and desktop behavior are not covered. +Claude catalog selection with a custom OAuth CLI profile needs a live Isaac check, +including default discovery, model locations, and providers when the ordinary profile +has expired. The automated suite does not cover this combination. + `test_mcp_web_search.py` and `test_agent_claude.py` cover custom OAuth search registration, stale registration repair, SDK cache reuse/refresh, CLI profile selection, and errors without browser consent through the MCP handler. These diff --git a/tests/integration/README.md b/tests/integration/README.md index e9f5f2f75..9bffd03a1 100644 --- a/tests/integration/README.md +++ b/tests/integration/README.md @@ -91,6 +91,10 @@ absent; use `--help` for the startup-import probe. Agent-specific bundled instruction selection and prompt/compaction hook content are covered in `../test_skills.py`; those component checks do not run live agents. +Custom OAuth startup with an expired ordinary profile has no automated integration +coverage. Validate Claude's default, model-location, and provider catalogs in Isaac +with the custom OAuth profile. + `TestChildStdoutLaunch` in `../test_cli.py` covers clean Claude print-mode and Codex exec/app-server stdout, early launch errors, and forwarding through ug's `--`. Token membership before the agent's `--` intentionally also matches option values and prompt