grist-core icon indicating copy to clipboard operation
grist-core copied to clipboard

Support for Litellm

Open Greatz08 opened this issue 3 months ago • 1 comments

Describe the problem to be solved

Litellm can help us in connecting with 100+ open source + proprietary llms easily free of cost without issue, so it can give users more options to choose from, which is always great for many us.

Describe the solution you would like

No response

Greatz08 avatar Sep 04 '25 15:09 Greatz08

If I'm understanding right, litellm can do a proxy that offers the /v1/chat/completions endpoint that Grist needs, so it may already work? https://litellm-api.up.railway.app/#/chat%2Fcompletions/chat_completion_v1_chat_completions_post

Should be very similar to https://github.com/gristlabs/grist-core/?tab=readme-ov-file#using-grist-with-openrouter-for-model-agnostic-and-claude-support

paulfitz avatar Sep 04 '25 16:09 paulfitz

I was able to make the AI Formula Assistant (Legacy) working with LiteLLM. Here are my env

ASSISTANT_CHAT_COMPLETION_ENDPOINT=https://<litellm.example.com>/v1/chat/completions
OPENAI_API_KEY=sk-1234
ASSISTANT_MODEL=gpt-5

mingfang avatar Oct 29 '25 01:10 mingfang