Skip to content

Feat: add new rejection wrappers#159

Merged
subpath merged 4 commits into
mainfrom
feat-add-new-rejection-wrappers
May 29, 2026
Merged

Feat: add new rejection wrappers#159
subpath merged 4 commits into
mainfrom
feat-add-new-rejection-wrappers

Conversation

@subpath
Copy link
Copy Markdown
Collaborator

@subpath subpath commented May 28, 2026

Classify two more 400 cases coming back from LiteLLM so we don't lump them with generic errors:

  • error 7: invalid model name (client requested a model not configured in LiteLLM)
  • error 8: malformed request body (Vertex INVALID_ARGUMENT, generic LiteLLM BadRequestError)

there are more than 100+ such errors per day, they are affecting our Success rate calculation

@subpath subpath requested a review from a team as a code owner May 28, 2026 16:36
Comment thread src/mlpa/core/errors.py
reason=PrometheusRejectionReason.INVALID_MODEL_NAME,
error_code=ERROR_CODE_INVALID_MODEL_NAME,
http_status=400,
log_message=f"Invalid model name for user {user}: {error_text}",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: The 413 RejectionMatch.log_message doesn't include the error_text - could we add it there or remove it here, just have it be consistent 🙏

@subpath subpath merged commit f2332b1 into main May 29, 2026
1 check passed
@subpath subpath deleted the feat-add-new-rejection-wrappers branch May 29, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants