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
The S3 Anthropic engine accepts base_url, and the CLI forwards --model_url into that parameter, but both generation methods construct Anthropic(api_key=...) without the supplied endpoint. Requests silently use the SDK's environment/default endpoint instead of the explicitly configured gateway.
Change
Store the supplied base URL and pass it to both Anthropic client construction paths.
Normalize the CLI's empty string to None, preserving the SDK's existing environment/default endpoint resolution.
Scope is the current S3 engine, which is the installed CLI entry point; older S1/S2/S2.5 implementations are unchanged. No new dependencies or public parameters.
Regression coverage
Plain generation, thinking=True, and generate_with_thinking.
Actual LMMAgent parameter forwarding.
Default URL, environment URL, explicit URL precedence, and empty-string behavior using the real SDK.
Real SDK + offline MockTransport requests, including custom path prefixes and request/response JSON. With the old engine, all three wire cases use the wrong endpoint; with the fix, all use the explicit endpoint.
black --check gui_agents tests — 77 files unchanged.
git diff --check — passed.
CLI construction smoke through the real S3/worker/grounding/code-agent classes: endpoint reaches eight mocked SDK calls. The GUI execution loop is mocked, not an actual desktop task.
The skip is an existing compatibility issue: Anthropic 1.15 removes temperature, so the existing plain-generation method cannot call that SDK version unchanged. This is separate from endpoint routing and already has related work in #205; this PR does not claim to fix it or change production dependency pins. The compatible SDK was used only in an isolated test environment. Both thinking wire paths also pass on 1.15.
No paid model calls, live gateways or real GUI interactions were used in verification.
Fresh validation against current main 0fff0e6: the S3 engine still does not forward the constructor's base_url into either Anthropic client, so this fix remains applicable. The affected S3 implementation is unchanged from the PR base.
Independently reran the regression suite on this head with Python 3.11.13 and Anthropic 1.15.0: 9 passed, 1 skipped. This includes actual SDK MockTransport requests for both thinking paths, confirming the requested gateway wins over ANTHROPIC_BASE_URL; constructor precedence and LMMAgent forwarding also pass. The plain-generation wire case is explicitly skipped because of the existing SDK temperature incompatibility (#205), not claimed as covered. Black across gui_agents and tests and git diff --check pass.
The fork lint workflow is action_required with no jobs started, rather than a reported test failure. Could a maintainer authorize the fork workflow and review the two client-constructor changes when convenient? No empty commit, unrelated SDK compatibility change or workflow bypass was added.
Validation and this follow-up were AI-assisted; no full integration-suite or hosted-CI success is implied.
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
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.
Problem
The S3 Anthropic engine accepts
base_url, and the CLI forwards--model_urlinto that parameter, but both generation methods constructAnthropic(api_key=...)without the supplied endpoint. Requests silently use the SDK's environment/default endpoint instead of the explicitly configured gateway.Change
None, preserving the SDK's existing environment/default endpoint resolution.Scope is the current S3 engine, which is the installed CLI entry point; older S1/S2/S2.5 implementations are unchanged. No new dependencies or public parameters.
Regression coverage
thinking=True, andgenerate_with_thinking.LMMAgentparameter forwarding.Validation
python -m unittest discover -s tests -v— 10 passed.black --check gui_agents tests— 77 files unchanged.git diff --check— passed.The skip is an existing compatibility issue: Anthropic 1.15 removes
temperature, so the existing plain-generation method cannot call that SDK version unchanged. This is separate from endpoint routing and already has related work in #205; this PR does not claim to fix it or change production dependency pins. The compatible SDK was used only in an isolated test environment. Both thinking wire paths also pass on 1.15.No paid model calls, live gateways or real GUI interactions were used in verification.