Skip to content
This repository was archived by the owner on May 27, 2026. It is now read-only.

vectorizers(litellm): Support setting max chunks per batch using env var - #898

Merged
alejandrodnm merged 1 commit into
timescale:mainfrom
NickCrews:patch-1
Dec 17, 2025
Merged

vectorizers(litellm): Support setting max chunks per batch using env var#898
alejandrodnm merged 1 commit into
timescale:mainfrom
NickCrews:patch-1

Conversation

@NickCrews

@NickCrews NickCrews commented Nov 16, 2025

Copy link
Copy Markdown
Contributor

I am using gemini as my provider. This wasn't listed as one of the providers, so I found I was getting the default of 5, and a warning message. This was slow.

So I added gemini to the code so it was supported.

But, more in general, I don't want some other user to be forced to modify the code in order to support their provider, so now you can configure this param with even more control using an env var

@NickCrews
NickCrews requested a review from a team as a code owner November 16, 2025 21:28
@NickCrews
NickCrews temporarily deployed to external-contributors November 16, 2025 21:28 — with GitHub Actions Inactive
@CLAassistant

CLAassistant commented Nov 16, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@NickCrews

NickCrews commented Nov 16, 2025

Copy link
Copy Markdown
Contributor Author

An alternative, config-less implementation you could consider of exponential increase: start with a small size, say 4, and on each request, double that, until you hit an error, then back off to the last successful batch size. Sloppier, and more complicated to implement initially, but then should require much less tuning.

@alejandrodnm

Copy link
Copy Markdown
Collaborator

Hey @NickCrews thanks for the PR. I'll make some time to review. Can you please rebase against main. I was fixing some things for pg18.

@NickCrews

Copy link
Copy Markdown
Contributor Author

@alejandrodnm I think I fixed the lint error and the format of the commit message

- max chunks per batch when sending using "gemini"
- add ability to configure this even more arbitrarily using env vars

Signed-off-by: Nick Crews <nicholas.b.crews@gmail.com>
@alejandrodnm
alejandrodnm deployed to external-contributors December 16, 2025 15:51 — with GitHub Actions Active
@alejandrodnm
alejandrodnm merged commit 3e05485 into timescale:main Dec 17, 2025
12 of 15 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants