Skip to content

fix(model): replace inherited output limits on request overrides - #4155

Closed
ningmao-hlyz wants to merge 1 commit into
agentscope-ai:mainfrom
ningmao-hlyz:fix/model-output-option-overrides
Closed

ningmao-hlyz wants to merge 1 commit into
agentscope-ai:mainfrom
ningmao-hlyz:fix/model-output-option-overrides

Conversation

@ningmao-hlyz

@ningmao-hlyz ningmao-hlyz commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

AgentScope-Java Version

2.1.0-SNAPSHOT, based on main at a4306d63 (#4154).

Description

Fixes #4164.

When a request overrides maxTokens, GenerateOptions.mergeOptions() can retain maxCompletionTokens from the model defaults, and vice versa. Treat the two fields as one override group. Preserve defaults when the request supplies neither field, and preserve both values when the request explicitly supplies both.

The regression tests cover both override directions. Provider-specific validation is unchanged. This is one commit, independent of the memory changes.

Validation on Windows with Java 17:

mvn -B -o -T1C -pl agentscope-core -am -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Djacoco.skip=true spotless:check test

3,454 tests, no failures or errors, 9 skipped. English and Chinese release notes describe the merge behavior change.

Checklist

  • Code has been formatted with mvn spotless:apply; Spotless checks pass.
  • Tests pass for the commands listed above.
  • Javadoc comments follow project conventions.
  • Related English and Chinese documentation has been updated.
  • Code is ready for review.

@mintlify

mintlify Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit 930f6a5.

Approve preview

@ningmao-hlyz
ningmao-hlyz force-pushed the fix/model-output-option-overrides branch from 9e6a23e to 930f6a5 Compare November 13, 2026 19:35
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]: Output limits are merged per field and window exhaustion is read as a complete response

1 participant