mirror of
https://github.com/Routstr/routstr-core.git
synced 2026-08-11 19:57:32 +00:00
fix: max_tokens as string should not work
This commit is contained in:
@@ -636,6 +636,12 @@ async def proxy(
|
||||
if request_body:
|
||||
try:
|
||||
request_body_dict = json.loads(request_body)
|
||||
|
||||
if "max_tokens" in request_body_dict:
|
||||
raise HTTPException(
|
||||
status_code=400,
|
||||
detail={"error": "max_tokens must be an integer (without quotes)"},
|
||||
)
|
||||
logger.debug(
|
||||
"Request body parsed",
|
||||
extra={
|
||||
|
||||
Reference in New Issue
Block a user