Skip to content

Configure litellm to drop unsupported parameters #491

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/codegate/llm_utils/llmclient.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import json
from typing import Any, Dict, Optional

import litellm
import structlog
from litellm import acompletion
from ollama import Client as OllamaClient
Expand All @@ -10,6 +11,8 @@

logger = structlog.get_logger("codegate")

litellm.drop_params = True


class LLMClient:
"""
Expand Down
3 changes: 3 additions & 0 deletions src/codegate/providers/litellmshim/litellmshim.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from typing import Any, AsyncIterator, Callable, Optional, Union

import litellm
import structlog
from fastapi.responses import JSONResponse, StreamingResponse
from litellm import (
Expand All @@ -12,6 +13,8 @@

logger = structlog.get_logger("codegate")

litellm.drop_params = True


class LiteLLmShim(BaseCompletionHandler):
"""
Expand Down
Loading