opencode-pollinations-plugin 5.3.3 → 5.3.4

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.
@@ -301,15 +301,10 @@ export async function handleChatCompletion(req, res, bodyRaw) {
301
301
  proxyBody.private = true;
302
302
  if (proxyBody.stream_options)
303
303
  delete proxyBody.stream_options;
304
- // 3.6 STOP SEQUENCES (Prevent Looping - CRITICAL FIX)
305
- // Inject explicit stop sequences to prevent "User:" hallucinations
306
- // 3.6 STOP SEQUENCES (Prevent Looping - CRITICAL FIX)
307
- // Inject explicit stop sequences to prevent "User:" hallucinations
308
- // EXCEPTION: Azure OpenAI o1-preview/mini models do NOT support 'stop' param.
309
- const isAzureO1 = actualModel.includes("o1") || actualModel.includes("azure");
310
- if (!proxyBody.stop && !isAzureO1) {
311
- proxyBody.stop = ["\nUser:", "\nModel:", "User:", "Model:"];
312
- }
304
+ // 3.6 STOP SEQUENCES (-REMOVED-)
305
+ // We do NOT inject 'stop' automatically anymore.
306
+ // Azure OpenAI strictly rejects 'stop' for many models (o1, etc) and throws 400.
307
+ // We rely on the upstream model to handle stops, or the client to send it if needed.
313
308
  // 3.5 PREPARE SIGNATURE HASHING
314
309
  let currentRequestHash = null;
315
310
  if (proxyBody.messages && proxyBody.messages.length > 0) {
@@ -331,12 +326,6 @@ export async function handleChatCompletion(req, res, bodyRaw) {
331
326
  // A. AZURE/OPENAI FIXES
332
327
  if (actualModel.includes("gpt") || actualModel.includes("openai") || actualModel.includes("azure")) {
333
328
  proxyBody.tools = truncateTools(proxyBody.tools, 120);
334
- if (actualModel.includes("o1") || actualModel.includes("azure")) {
335
- if (proxyBody.stop)
336
- delete proxyBody.stop; // Force remove if present
337
- if (proxyBody.max_tokens)
338
- delete proxyBody.max_tokens; // O1 uses max_completion_tokens
339
- }
340
329
  if (proxyBody.messages) {
341
330
  proxyBody.messages.forEach((m) => {
342
331
  if (m.tool_calls) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "opencode-pollinations-plugin",
3
3
  "displayName": "Pollinations AI (V5.1)",
4
- "version": "5.3.3",
4
+ "version": "5.3.4",
5
5
  "description": "Native Pollinations.ai Provider Plugin for OpenCode",
6
6
  "publisher": "pollinations",
7
7
  "repository": {