Skip to content

v0.2.7 — 统一 temperature 可选策略 / Unified optional-temperature policy

Latest

Choose a tag to compare

@xyskywalker xyskywalker released this 27 Apr 12:32

中文

针对厂商近期的模型参数调整(Claude Opus 4.6/4.7 已不再接受 temperature;最新 GPT 5.4/5.5 不允许 temperature 与 top_k/top_p 同时传入),本版本统一了 Ripple 的 temperature 策略:

  • 全 adapter 统一:chat_completions、responses、anthropic、bedrock(含 Anthropic 与 Titan 两路)行为完全一致。
  • 不配置就不发送:当 llm_config.yaml、simulate(llm_config=...) 参数和直接构造 adapter 时都不指定 temperature,Ripple 不再自动补默认值,也不会在 LLM 请求体里写入该字段。
  • ModelEndpointConfig.temperature 默认值由 0.7 改为 None。
  • Anthropic 流式适配器增强 4xx 错误处理,最终异常会携带上游具体错误信息,不再出现 ResponseNotRead。
  • llm_config.example.yaml 新增兼容性提示,说明何时应删除 temperature: 行。

迁移提示:旧配置无需修改;如使用最新 Claude Opus 4.6/4.7 或 GPT 5.4/5.5,在对应角色 / _default 中删除 temperature: 行即可。

English

In response to recent provider changes (Claude Opus 4.6/4.7 no longer accepting temperature; the latest GPT 5.4/5.5 models disallowing temperature together with top_k/top_p), this release unifies Ripple's temperature policy:

  • All adapters aligned: chat_completions, responses, anthropic, and bedrock (both Anthropic and Titan request bodies) behave identically.
  • No config → not sent: when temperature is absent from llm_config.yaml, the simulate(llm_config=...) dict, and direct adapter construction, Ripple no longer injects a default and will not include temperature in the outgoing LLM request body.
  • ModelEndpointConfig.temperature default changed from 0.7 to None.
  • Anthropic streaming adapter now surfaces upstream 4xx error bodies in the final exception, eliminating opaque ResponseNotRead errors.
  • llm_config.example.yaml gained compatibility notes explaining when to remove the temperature: line.

Migration: existing configs require no change; if you are running the latest Claude Opus 4.6/4.7 or GPT 5.4/5.5, simply remove the temperature: line from the corresponding role / _default section.