发布

  • [NA] [FE][BE] Enforce exclusive temperature/top_p for all Anthropic models (#5296)

    frostbyte_neo 发布于 2026-02-18 13:35:33 +00:00

    • [NA] [FE] Enforce exclusive temperature/top_p for all Anthropic models

    Anthropic's API rejects requests containing both temperature and top_p.
    Previously the exclusivity was only enforced for a subset of newer models;
    this applies it to all Anthropic models and adds a safety net at the API
    call layer.

    Co-authored-by: Cursor cursoragent@cursor.com

    • [NA] [BE] Drop top_p when temperature is set in Anthropic mapper

    The backend mapper unconditionally forwarded both temperature and topP
    to the Anthropic API, which rejects requests containing both. The
    frontend fix alone was insufficient because even with topP omitted from
    the JSON payload, other code paths or future changes could reintroduce
    the conflict. The mapper now drops topP when temperature is present.

    Co-authored-by: Cursor cursoragent@cursor.com


    Co-authored-by: Andrei Căutișanu andreicautisanu@Andreis-MacBook-Pro.local
    Co-authored-by: Cursor cursoragent@cursor.com

    下载附件