Skip to content

[OPIK-3845][SDK] Fix: Optimizer breaking issues - #4875

Merged
vincentkoc merged 11 commits into
mainfrom
vk/optimizer-patch-terminal
Jan 23, 2026
Merged

[OPIK-3845][SDK] Fix: Optimizer breaking issues#4875
vincentkoc merged 11 commits into
mainfrom
vk/optimizer-patch-terminal

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Jan 22, 2026

Copy link
Copy Markdown
Contributor

Details

This resolves three breaking bugs on currently deployed SDK:

  • Rate limiter error – When you hit TypeError: Limiter.init() got an unexpected keyword argument 'raise_when_fail', it means the version of pyrate_limiter installed on your machine no longer accepts that legacy keyword. The workaround is to pin a compatible release (our optimizer sdk for versions less than 3.0 currently works with pyrate_limitter 3.x). To fix this run pip install "pyrate-limiter>=3.0.0,<4.0.0" so the initializer still accepts raise_when_fail; newer 4.x releases dropped it. Future releases of optimizer versions 2.3.12 and above resolves this issue.
  • tqdm rich progress error – convert_tqdm_to_rich.._tqdm_to_track() missing 1 required positional argument: 'iterable' stems from a breaking change in tqdm 4.71+. Downgrading tqdm by pinning the version pip install tqdm==4.70.0 or downgrading optimizer SDK (not recommended) to 1.9.70 restores the expected wrapper signature. Future releases of optimizer versions 2.3.12 and above resolves this issue.
  • pydantic seralization warnings - PydanticSerializationUnexpectedValue is caused by an upstream change in Litellm packages and was later patched in a nightly build Normalize OpenAI SDK BaseModel choices/messages to avoid Pydantic serializer warnings BerriAI/litellm#18972 these errors do not impact performance. You can omit this by force upgrading litellm using pip install --upgrade "litellm<1.81.1"
  • litellm breaks Openai calls - litellm.InternalServerError: InternalServerError: OpenAIException - Connection error. latest public build of litellm 1.81.1 (Jan 21) breaks OpenAI evaluation in Opik SDK and Opik Optimizer. Added to our avoid version in both optimizer and python SDKs. Suggest fixing by installing earlier working build pip install --upgrade "litellm<1.81.1" (Bug report raised with Litellm, root cause unknown)

Change checklist

  • User facing
  • Documentation update

Issues

  • OPIK-3845
  • OPIK-3907

Testing

Validated with e2e tests and scripts examples

Documentation

Not required

@vincentkoc
vincentkoc requested review from a team and dsblank as code owners January 22, 2026 17:27
@github-actions github-actions Bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code Optimizer SDK labels Jan 22, 2026
Comment thread sdks/opik_optimizer/src/opik_optimizer/__init__.py
@comet-ml comet-ml deleted a comment from github-actions Bot Jan 22, 2026
@vincentkoc vincentkoc changed the title [OPIK-3845][SDK] Fix: Optimizer TQDM and Pydantic Warning [OPIK-3845][SDK] Fix: Optimizer breaking issues Jan 22, 2026
Comment thread sdks/opik_optimizer/src/opik_optimizer/_throttle.py
Co-authored-by: baz-reviewer[bot] <174234987+baz-reviewer[bot]@users.noreply.github.com>
Comment thread sdks/opik_optimizer/src/opik_optimizer/_throttle.py
Comment thread sdks/opik_optimizer/src/opik_optimizer/_throttle.py
@vincentkoc
vincentkoc requested a review from a team as a code owner January 23, 2026 01:12
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jan 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🌿 Preview your docs: https://opik-preview-98ef4b48-fdd8-40df-a376-99587f64b305.docs.buildwithfern.com/docs/opik

No broken links found


📌 Results for commit 1094525

@vincentkoc
vincentkoc merged commit 105f3ef into main Jan 23, 2026
20 checks passed
@vincentkoc
vincentkoc deleted the vk/optimizer-patch-terminal branch January 23, 2026 01:35
jverre pushed a commit that referenced this pull request Jun 12, 2026
* fix: tqdm error

* fix: pydantic error

* Update pyproject.toml

* Update _throttle.py

* fix: mypy for throttle

* chore: baz, async throttle

* Update sdks/opik_optimizer/src/opik_optimizer/_throttle.py

Co-authored-by: baz-reviewer[bot] <174234987+baz-reviewer[bot]@users.noreply.github.com>

* fix: mypy for async

* fix: broken litellm build

* docs: known issues

---------

Co-authored-by: baz-reviewer[bot] <174234987+baz-reviewer[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation Optimizer SDK python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant