-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
Problem (one or two sentences)
When using OpenRouter models (specifically z-ai/glm-4.7) with non-English languages like Korean, the model often outputs raw Unicode escape sequences (e.g., \uC548\uB855) instead of readable text.
This happens because OpenRouter automatically routes requests to low-bit quantization providers (specifically FP4 or Int4 from providers like Venice, NextBit, Mancer, DeepInfra). These aggressively quantized models fail to properly decode multi-byte characters (CJK), resulting in broken chat responses and corrupted file generation in artifacts.
Context (who is affected and when)
This affects international users (specifically Korean, Chinese, and Japanese speakers) who use OpenRouter as their API provider.
The issue occurs when the user selects a model without specifying a provider, and OpenRouter routes the request to a cheaper/faster FP4/Int4 provider. High-precision providers (FP16/BF16/FP8) handle these languages perfectly, but users currently have no easy way within Roo Code to force these options or exclude the bad ones.
Desired behavior (conceptual, not technical)
I would like a "Quantization Filter" or "Ignore Provider" setting added to the OpenRouter configuration menu in Roo Code.
Ideally, there should be a checkbox or input field (e.g., "Exclude Low-Bit Quantization (FP4/Int4)") that modifies the API request body sent to OpenRouter.
Technical Implementation Example:
When this option is enabled, Roo Code should inject the provider parameters into the API request as per the OpenRouter Documentation:
// Request body
"provider": {
// Option A: Allow only higher precision
"quantizations": ["fp16", "bf16", "fp8"],
// OR Option B: Explicitly ignore problematic providers
"ignore": ["venice", "deepInfra", "mancer", "nextbit"]
}
This would allow users to prevent encoding issues directly within the extension without needing to manually configure settings on the OpenRouter website or modify the extension's source code.
Constraints / preferences (optional)
No response
Request checklist
- I've searched existing Issues and Discussions for duplicates
- This describes a specific problem with clear context and impact
Roo Code Task Links (optional)
No response
Acceptance criteria (optional)
No response
Proposed approach (optional)
No response
Trade-offs / risks (optional)
No response