Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Commit 1788eb8

Browse files
committed
Configure litellm to drop unsupported parameters
1 parent 8b95d7f commit 1788eb8

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/codegate/llm_utils/llmclient.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import json
22
from typing import Any, Dict, Optional
33

4+
import litellm
45
import structlog
56
from litellm import acompletion
67
from ollama import Client as OllamaClient
@@ -10,6 +11,8 @@
1011

1112
logger = structlog.get_logger("codegate")
1213

14+
litellm.drop_params = True
15+
1316

1417
class LLMClient:
1518
"""

src/codegate/providers/litellmshim/litellmshim.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from typing import Any, AsyncIterator, Callable, Optional, Union
22

3+
import litellm
34
import structlog
45
from fastapi.responses import JSONResponse, StreamingResponse
56
from litellm import (
@@ -12,6 +13,8 @@
1213

1314
logger = structlog.get_logger("codegate")
1415

16+
litellm.drop_params = True
17+
1518

1619
class LiteLLmShim(BaseCompletionHandler):
1720
"""

0 commit comments

Comments
 (0)