Skip to content

Commit

Permalink
fix(agents-api/litellm): fixed get_developer data and test the routes…
Browse files Browse the repository at this point in the history
… + removed Google cloud models in config
  • Loading branch information
Vedantsahai18 committed Nov 22, 2024
1 parent 974d732 commit 71043d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
6 changes: 4 additions & 2 deletions agents-api/agents_api/routers/tasks/create_task_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
)
from ...clients.temporal import run_task_execution_workflow
from ...common.protocol.developers import Developer
from ...dependencies.developer_id import get_developer_data, get_developer_id
from ...dependencies.developer_id import get_developer_id
from ...env import max_free_executions
from ...models.developer.get_developer import get_developer
from ...models.execution.count_executions import (
count_executions as count_executions_query,
)
Expand Down Expand Up @@ -119,13 +120,14 @@ async def create_task_execution(
raise

# get developer data
developer: Developer = Annotated[Developer, Depends(get_developer_data)]
developer: Developer = get_developer(developer_id=x_developer_id)

# # check if the developer is paid
if "paid" not in developer.tags:
executions = count_executions_query(
developer_id=x_developer_id, task_id=task_id
)

execution_count = executions["count"]
if execution_count > max_free_executions:
raise HTTPException(
Expand Down
12 changes: 0 additions & 12 deletions llm-proxy/litellm-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,6 @@ model_list:
api_key: os.environ/GEMINI_API_KEY
tags: ["paid"]

- model_name: gemini-1.5-pro
litellm_params:
model: vertex_ai_beta/gemini-1.5-pro
tags: ["paid"]
vertex_credentials: os.environ/GOOGLE_APPLICATION_CREDENTIALS

- model_name: claude-3.5-sonnet-20240620
litellm_params:
model: vertex_ai/claude-3-5-sonnet@20240620
tags: ["paid"]
vertex_credentials: os.environ/GOOGLE_APPLICATION_CREDENTIALS

# OpenAI models
- model_name: "gpt-4-turbo"
litellm_params:
Expand Down

0 comments on commit 71043d0

Please sign in to comment.