Skip to content

feat(router): reject oversized prompts before backend - #21

Merged
phaedrus-on-git merged 1 commit into
mainfrom
feat/max-prompt-reject
Sep 27, 2026
Merged

phaedrus-on-git merged 1 commit into
mainfrom
feat/max-prompt-reject

Conversation

@phaedrus-on-git

Copy link
Copy Markdown
Collaborator

Summary

  • add alias-level max_prompt_chars config and advertise it in model cards
  • reject oversized prompts before queue acquisition, ensure hooks, or backend proxying
  • return OpenAI-shaped context_length_exceeded errors with compact-context headers and prompt-limit metrics

Tests

  • go test ./internal/config ./internal/server
  • make check

@phaedrus-on-git
phaedrus-on-git merged commit 8acc51f into main Sep 27, 2026
8 checks passed
@phaedrus-on-git
phaedrus-on-git deleted the feat/max-prompt-reject branch September 27, 2026 17:32
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.

1 participant