opencode-pollinations-plugin 5.8.4-beta.13 → 5.8.4-beta.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -265,6 +265,8 @@ function mapModel(raw, prefix, namePrefix, nameSuffix = '') {
265
265
  }
266
266
  if (rawId.includes('chicky') || rawId.includes('mistral')) {
267
267
  modelObj.limit = { output: 4096, context: 8192 };
268
+ modelObj.options = { ...modelObj.options, maxTokens: 4096 };
269
+ log(`[LimitConfig] Applied strict limit to ${fullId}: output=4096, context=8192`);
268
270
  }
269
271
  /*
270
272
  if (rawId.includes('fast') || rawId.includes('flash')) {
@@ -274,5 +276,9 @@ function mapModel(raw, prefix, namePrefix, nameSuffix = '') {
274
276
  }
275
277
  */
276
278
  }
279
+ // DEBUG LIMITS
280
+ if (modelObj.limit) {
281
+ log(`[Model] ${modelObj.id} Limit: ${JSON.stringify(modelObj.limit)}`);
282
+ }
277
283
  return modelObj;
278
284
  }
@@ -478,6 +478,14 @@ export async function handleChatCompletion(req, res, bodyRaw) {
478
478
  log(`[Proxy] Gemini Logic: Tools=${proxyBody.tools ? proxyBody.tools.length : 'REMOVED'}, Stops NOT Injected.`);
479
479
  }
480
480
  }
481
+ // B5. BEDROCK TOKEN LIMIT FIX
482
+ if (actualModel.includes("chicky") || actualModel.includes("mistral")) {
483
+ // Force max_tokens if not present or too high (Bedrock outputs usually max 4k, context 8k+ but strict check)
484
+ if (!proxyBody.max_tokens || proxyBody.max_tokens > 4096) {
485
+ proxyBody.max_tokens = 4096;
486
+ log(`[Proxy] Enforcing max_tokens=4096 for ${actualModel} (Bedrock Limit)`);
487
+ }
488
+ }
481
489
  // C. GEMINI ID BACKTRACKING & SIGNATURE
482
490
  if ((actualModel.includes("gemini") || actualModel === "nomnom") && proxyBody.messages) {
483
491
  const lastMsg = proxyBody.messages[proxyBody.messages.length - 1];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "opencode-pollinations-plugin",
3
3
  "displayName": "Pollinations AI (V5.6)",
4
- "version": "5.8.4-beta.13",
4
+ "version": "5.8.4-beta.15",
5
5
  "description": "Native Pollinations.ai Provider Plugin for OpenCode",
6
6
  "publisher": "pollinations",
7
7
  "repository": {