mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
Fix dry-run HTTPException guard and VantageLogger instance detection
- Add missing except HTTPException: raise in vantage_dry_run_export (consistent with all other endpoints in the file) - Fix is_vantage_setup_in_config() to detect both the string "vantage" and VantageLogger instances in litellm.callbacks, preventing duplicate logger registration on startup Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
622d5dabba
commit
230c85313b
1 changed files with 8 additions and 3 deletions
|
|
@ -276,10 +276,13 @@ async def is_vantage_setup_in_db() -> bool:
|
|||
|
||||
|
||||
def is_vantage_setup_in_config() -> bool:
|
||||
"""Check if Vantage is setup in config.yaml or environment variables."""
|
||||
import litellm
|
||||
"""Check if Vantage is setup in config.yaml, environment variables, or programmatically."""
|
||||
from litellm.integrations.vantage.vantage_logger import VantageLogger
|
||||
|
||||
return "vantage" in litellm.callbacks
|
||||
for cb in litellm.callbacks:
|
||||
if cb == "vantage" or isinstance(cb, VantageLogger):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
async def is_vantage_setup() -> bool:
|
||||
|
|
@ -412,6 +415,8 @@ async def vantage_dry_run_export(
|
|||
summary=summary,
|
||||
)
|
||||
|
||||
except HTTPException:
|
||||
raise
|
||||
except Exception as e:
|
||||
verbose_proxy_logger.error(
|
||||
f"Error performing Vantage dry run export: {str(e)}"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue