mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
fix(main.py): fix retries being multiplied when using openai sdk (#7221)
* fix(main.py): fix retries being multiplied when using openai sdk Closes https://github.com/BerriAI/litellm/pull/7130 * docs(prompt_management.md): add langfuse prompt management doc * feat(team_endpoints.py): allow teams to add their own models Enables teams to call their own finetuned models via the proxy * test: add better enforcement check testing for `/model/new` now that teams can add their own models * docs(team_model_add.md): tutorial for allowing teams to add their own models * test: fix test
This commit is contained in:
parent
8060c5c698
commit
ec36353b41
16 changed files with 2439 additions and 1540 deletions
|
@ -363,13 +363,18 @@ async def _update_model_table(
|
|||
created_by=user_api_key_dict.user_id or litellm_proxy_admin_name,
|
||||
updated_by=user_api_key_dict.user_id or litellm_proxy_admin_name,
|
||||
)
|
||||
model_dict = await prisma_client.db.litellm_modeltable.upsert(
|
||||
where={"id": model_id},
|
||||
data={
|
||||
"update": {**litellm_modeltable.json(exclude_none=True)}, # type: ignore
|
||||
"create": {**litellm_modeltable.json(exclude_none=True)}, # type: ignore
|
||||
},
|
||||
) # type: ignore
|
||||
if model_id is None:
|
||||
model_dict = await prisma_client.db.litellm_modeltable.create(
|
||||
data={**litellm_modeltable.json(exclude_none=True)} # type: ignore
|
||||
)
|
||||
else:
|
||||
model_dict = await prisma_client.db.litellm_modeltable.upsert(
|
||||
where={"id": model_id},
|
||||
data={
|
||||
"update": {**litellm_modeltable.json(exclude_none=True)}, # type: ignore
|
||||
"create": {**litellm_modeltable.json(exclude_none=True)}, # type: ignore
|
||||
},
|
||||
) # type: ignore
|
||||
|
||||
_model_id = model_dict.id
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue