Skip to content

fix(core): extract ExtendedModel and its simple-implement class - #240

Merged
AlbumenJ merged 2 commits into
agentscope-ai:mainfrom
fang-tech:fang-tech/fix-extendedModel-package-local
Dec 18, 2025
Merged

AlbumenJ merged 2 commits into
agentscope-ai:mainfrom
fang-tech:fang-tech/fix-extendedModel-package-local

Conversation

@fang-tech

Copy link
Copy Markdown
Collaborator

AgentScope-Java Version

1.0.3-SNAPSHOT

Description

fix #239

Checklist

Please check the following items before code is ready to be reviewed.

  • Code has been formatted with mvn spotless:apply
  • All tests are passing (mvn test)
  • Javadoc comments are complete and follow project conventions
  • Related documentation has been updated (e.g. links, examples, etc.)
  • Code is ready for review

@fang-tech
fang-tech requested a review from a team December 18, 2025 12:25
@codecov

codecov Bot commented Dec 18, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@AlbumenJ
AlbumenJ merged commit 426a91e into agentscope-ai:main Dec 18, 2025
JGoP-L pushed a commit to JGoP-L/agentscope-java that referenced this pull request Dec 29, 2025
Letter2025 added a commit to Letter2025/agentscope-java that referenced this pull request Sep 16, 2026
…g semantics

Follow-up to the re-review (all 4 warnings + 3 infos addressed):

- Capability contract (agentscope-ai#338): ReActAgent validates the chain at build time and warns when a candidate reports a smaller context window or different structured-output support than the primary (the chain reports the primary's capabilities). FallbackChainModel javadoc documents the compatibility requirement; agent.md EN+ZH updated.
- Cooldown semantics (agentscope-ai#185, agentscope-ai#240): auth failures (401/403) are no longer cooled — a wrong credential will not fix itself and the real auth error must surface; they still switch. Mid-stream failures only cool the candidate when classified SWITCHABLE (request-shaped failures like oversized payloads do not park the primary for other sessions). The all-cooling error now propagates the last real failure as cause (remembered per candidate) instead of a bare synthetic message; wording no longer counts the primary as a 'fallback candidate'.
- Cooldown key (agentscope-ai#286): replaced System.identityHashCode with the stable chain index (collision-free across wrapper instances sharing a table with the same candidate order).
- Cleanup (agentscope-ai#258): removed the tautological size() > 0 && !isEmpty() guard (removeIf is a no-op on an empty map).
- Docs (agentscope-ai#657, agentscope-ai#626): agent.md EN capability bullet now matches the code (reports the primary); added the ZH fallbackModels section mirroring the EN one.

Tests: 3 new cases (auth-not-cooled, mid-stream request-side not cooled, all-cooling preserves cause); existing cooldown-message test updated to assert the propagated last failure; FallbackChainModelTest 29/29, ReActAgentFallbackChainTest 9/9, model+agent package 373 green.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: ToolRegistration's public method extendedModel() parameter is tool package-local

2 participants