Repository navigation
Conversation
This branch has not been deployed
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.
AgentScope-Java Version
2.1.0-SNAPSHOT (targeting
main)Description
Fixes #4437
Companion fix to the
2.0.xModelSchedulersbackport (#4436 / #4438) to ensure full scheduling parity across all model extensions onmainand prevent regression when upgrading from2.0.6to2.1.0.Changes
agentscope-extensions-model-anthropic:AnthropicChatModel.doStream(...)outerresponseFluxfromSchedulers.boundedElastic()tostreamEnabled ? ModelSchedulers.streams() : ModelSchedulers.requests()beforeModelUtils.applyTimeoutAndRetry(...)so both synchronousclient.messages().createStreaming(params)connection setup and non-streaming kickoff run onModelSchedulers..subscribeOn(Schedulers.boundedElastic())onFlux.fromStream(streamResponse.stream())to avoid unnecessary thread switches.AnthropicChatModelSchedulingTestverifying withMockWebServer(including delayed SSE headers) and a tracking formatter that streaming connect/iteration run onagentscope-model-stream-*without blocking callersubscribe(), and non-streaming kickoff runs onagentscope-model-request-*.Verification
git grep -n "boundedElastic"underagentscope-extensions/agentscope-extensions-model/agentscope-extensions-model-anthropic/src/main: empty (0 remaining calls).mvn -T1C -pl agentscope-extensions/agentscope-extensions-model/agentscope-extensions-model-anthropic -am spotless:apply spotless:check test(BUILD SUCCESS):agentscope-core: 3,567 run, 0 failed, 0 errors, 11 pre-existing skippedagentscope-extensions-model-anthropic: 262 run, 0 failed, 0 errors, 0 skipped (AnthropicChatModelSchedulingTest: 2/2)ModelSchedulersis already documented onmain(docs/dev/{en,zh}/docs/building-blocks/model.md), so no doc changes are needed here.Checklist
Please check the following items before code is ready to be reviewed.
mvn spotless:applymvn test)