fix(amazon): send Top K only to providers with it (#14758)
* fix(amazon): send Top K only to providers with it Bedrock Converse defined a Top K input that build_model never read, so the value the user set was silently dropped - temperature, max_tokens and top_p were all wired into init_params, top_k was not. Wiring it into additionalModelRequestFields is necessary but not sufficient on its own: the input defaults to 250 and every saved flow persists that value, so an ungated send reaches models that document no top_k at all. Meta Llama takes prompt/temperature/top_p/max_gen_len, Amazon Titan and AI21 have no top_k, and Cohere spells it "k" - that is 23 of the 44 models in the dropdown, and Converse rejects the whole call when additionalModelRequestFields carries a field the model does not support. Scope the send to the providers that document the parameter; the others can still opt in through Additional Model Fields. Fixes LE-2296 Fixes #14716 Co-authored-by: zanarelli <zanarelli.dev@gmail.com> * chore: auto-bake note keys and regenerate backend locales/en.json [skip ci] * fix(amazon): narrow Top K to Anthropic, add global prefix Gating by the "mistral" provider was too coarse. Mistral Large speaks the chat-completion schema, which documents no top_k at all, and the text-completion models cap it below this component's default of 250 - so the gate still shipped a payload outside the documented contract. Auto-forward for Anthropic only, the provider AWS documents top_k for in the Converse API; every other provider can pass its own equivalent through Additional Model Fields, as before. Also strip the "global" inference-profile prefix, so global.anthropic.* is recognised as Anthropic rather than dropping Top K and leaving the original bug in place for those ids. * chore: auto-bake note keys and regenerate backend locales/en.json [skip ci] * chore(amazon): bump bundle version to 0.1.3 * chore(release): sync amazon bundle profile --------- Co-authored-by: zanarelli <zanarelli.dev@gmail.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Eric Hare <ericrhare@gmail.com>
C
Cristhian Zanforlin Lousa committed
43083e63927096f304788190a250fcf483e9bf12
Parent: cc5ab12
Committed by GitHub <noreply@github.com>
on 8/25/2026, 7:04:59 PM