[Question] Is SlimeRouter + RadixTree intended to be strict TITO gateway?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.5k
- Forks
- 1.3k
- Avg merge
- 5h 36m
- Merged PRs (30d)
- 22
Description
Your Question
I’m trying to understand current SlimeRouter behavior in RadixTreeMiddleware + proxy path.
From the report, my understanding is:
In middleware, /generate payload is rewritten:
request_json = await request.json()
request_json["input_tokens"] = input_tokens
request_json["stream"] = False
request._json = request_json
But in SlimeRouter.proxy, forwarding uses raw body bytes:
body = await request.body()
My question:
Is this intended (middleware rewrite is only for local cache logic, not for downstream forwarding)?
Or should worker actually receive rewritten /generate JSON (strict gateway/token-in behavior)?
If intended, should docs explicitly state this to avoid confusion around RadixTree “transparent token management”?
I may be misunderstanding the design, so would appreciate clarification from maintainers.
What I've Tried
- I have search issues about this
Environment (if relevant)
Additional Context
No response
Pre-submission Checklist
- I have read the CONTRIBUTING.md and understand the collaboration scope.
- I have read the documentation and FAQ and my question is not answered there.
- I have searched for existing issues and my question has not been asked before.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the RadixTreeMiddleware handling of /generate and the SlimeRouter.proxy entry point, comparing the rewritten request JSON with the raw body forwarded downstream. Check the linked documentation and FAQ context. Done means the intended gateway contract is established and, if needed, documented clearly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100