weiqingy opened a new pull request, #1039:
URL: https://github.com/apache/flink-agents/pull/1039

   Linked issue: #1038
   
   ### Purpose of change
   
   The Anthropic chat model defaults to `claude-sonnet-4-20250514` when the 
caller omits `model`. That model is deprecated, so a user who takes the default 
silently gets a deprecated model today and will hit a hard failure whenever it 
retires. The same value is restated in a Javadoc parameter list, a Javadoc 
example, a Python docstring, two docs parameter tables and two docs examples, 
so it had drifted in nine places rather than one.
   
   This change moves the default to `claude-sonnet-4-5` in both language 
runtimes and updates every restatement. The undated alias matches every other 
chat model default in the repo (`gpt-4o-mini`, `gpt-4o`, 
`gemini-3.1-pro-preview`, `qwen-plus`); Anthropic was the only one pinned to a 
dated snapshot, which is why it went stale. Unlike a dated snapshot, an alias 
cannot decay into a retired id again.
   
   `claude-sonnet-4-5` keeps the same tier as the model it replaces, so a 
caller relying on the default sees no change in cost or class of model. It is 
also the name the connection tests introduced in #965 already use as their 
structured-output-capable example, on the grounds that it is the generation 
which is both capable and still accepts a JSON prefill.
   
   Two smaller things ride along, both of the same defect class. The Python 
docstring now names `DEFAULT_ANTHROPIC_MODEL` instead of repeating its value, 
matching the OpenAI and Tongyi integrations, so it cannot drift from the 
constant a second time. The docs list of available models is pruned to three 
current entries, because three of its four entries named models that are 
deprecated or already retired, one of them past its retirement date.
   
   Callers that pass `model` explicitly are unaffected. The constant is 
consulted only when the resource descriptor omits `model`.
   
   ### Tests
   
   `AnthropicChatModelSetupTest.testGetParametersDefaults` asserts the 
documented defaults and is updated to the new value. The existing Python test 
asserts against the imported constant rather than a hard-coded string, so it 
continues to pin the default without change.
   
   Two test constants in the suites added by #965 named the old model as the 
shipped default. They keep their value, because those tests need a model the 
provider does not document native structured-output support for and that is 
still what it is, but their comments no longer describe it as the default.
   
   No new tests. The default is already pinned on both sides, and an assertion 
that a private constant equals its own literal would not catch a bug the 
compiler misses.
   
   ### API
   
   No API signature change. Only the value of the default model changes.
   
   ### Documentation
   
   - [ ] `doc-needed`
   - [ ] `doc-not-needed`
   - [X] `doc-included`
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   - [X] Yes
   - [ ] No
   
   Generated-by: Claude Code 2.1.234 (Claude Opus 5)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to