-
Notifications
You must be signed in to change notification settings - Fork 46
[Release] Hotfix - OpenRouter auto negative pricing #564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
e30228f
e53edfe
27dbd15
89b3451
3278e3f
af978d0
54ecfe0
7c6a514
b4f7f93
0ec1dc2
56b1dc0
e799344
8b1b227
b3998c5
0cded6c
293fd59
63a38e4
2ac0348
c1ae0cf
9b98dc1
3fd58d0
6facf82
34d7c38
949ea98
b0a9890
a2aec60
8392323
aa1f762
05e59cf
30cc7a9
926aff1
6d16752
c610ce6
afdaba6
600d6aa
447a30a
22150b4
5d63e2f
877125d
4b1f540
d5b2b05
c0056c0
d7b3728
208135b
f27762a
793861c
2eb0e31
08c29d9
1b6daa1
d98d37f
cfd90d6
f6dc1b5
ee90834
17c237c
28d9751
5dab845
21cd217
3719252
46fc77b
1847e34
813fc82
f2202a8
395d070
9584440
ca3ea92
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -19,6 +19,14 @@ const providers = { | |||||||||||||||||||||
| gemini: handleGoogleGenerate, | ||||||||||||||||||||||
| }; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| export const config = { | ||||||||||||||||||||||
| api: { | ||||||||||||||||||||||
| bodyParser: { | ||||||||||||||||||||||
| sizeLimit: '4mb', | ||||||||||||||||||||||
| }, | ||||||||||||||||||||||
| }, | ||||||||||||||||||||||
| }; | ||||||||||||||||||||||
|
Comment on lines
+22
to
+28
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
The View DetailsAnalysisexport const config with bodyParser ignored in App Router route handlerWhat fails: templates/next-image/src/app/api/generate-image/route.ts uses How to reproduce:
Result: The 4MB size limit configuration is silently ignored, potentially causing failures for large image generation requests that exceed the default 1MB limit Expected: App Router Route Handlers don't support |
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| export async function POST(req: Request) { | ||||||||||||||||||||||
| try { | ||||||||||||||||||||||
| const body = await req.json(); | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
export const configwithbodyParserconfiguration is incompatible with Next.js App Router and will be ignored.View Details
📝 Patch Details
Analysis
Invalid bodyParser configuration in App Router route handler
What fails: The
export const configwithbodyParser.sizeLimitintemplates/next-image/src/app/api/edit-image/route.tsis silently ignored in Next.js App Router, leaving the 4MB body size limit unenforced.How to reproduce:
Result: The
export const configfrom Pages Router API (pages/api/) does not work in App Router (src/app/api/). Body size limits are not enforced, potentially allowing requests larger than intended 4MB limit.Expected: In App Router, body size limits should be configured globally via
experimental.serverActions.bodySizeLimitinnext.config.tsper Next.js App Router discussions and official documentation.