<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>OpenAI Compatible API on Margrop Blog</title>
		<link>https://blog.margrop.net/en/tag/openai-compatible-api/</link>
		<description>Recent content in OpenAI Compatible API on Margrop Blog</description>
		<generator>Hugo</generator>
		<language>en-US</language>
		
		
		
		
			<lastBuildDate>Sun, 31 May 2026 18:00:00 +0800</lastBuildDate>
		
			<atom:link href="https://blog.margrop.net/en/tag/openai-compatible-api/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Double-Consumed Streaming: Debugging a NewAPI v1.0.0-rc.10 MiniMax Proxy Bug</title>
				<link>https://blog.margrop.net/en/post/newapi-streaming-duplicate-content-debugging/</link>
				<pubDate>Sun, 31 May 2026 18:00:00 +0800</pubDate>
				<guid>https://blog.margrop.net/en/post/newapi-streaming-duplicate-content-debugging/</guid>
				<description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;An AI Agent was producing duplicated replies in DingTalk — not two separate messages, but a single message whose content appeared twice. The root cause traced back to a streaming bug in NewAPI (the QuantumNous fork of OneAPI) v1.0.0-rc.10: when proxying MiniMax through the OpenAI Chat Completions protocol, the finish chunk contained &lt;strong&gt;both &lt;code&gt;delta.content&lt;/code&gt; and &lt;code&gt;message.content&lt;/code&gt;&lt;/strong&gt; with identical values. The Agent&amp;rsquo;s stream handler consumed both as &amp;ldquo;visible text,&amp;rdquo; concatenating the content twice. The fix was straightforward: switch the OpenClaw provider protocol from &lt;code&gt;openai-completions&lt;/code&gt; to &lt;code&gt;anthropic-messages&lt;/code&gt;, which OneAPI natively supports and where streaming behaves correctly.&lt;/p&gt;&#xA;&lt;p&gt;No internal IPs, tokens, model IDs, or private paths appear in this article. All configuration snippets have been sanitized.&lt;/p&gt;&#xA;&lt;/blockquote&gt;</description>
			</item>
			<item>
				<title>Why My AI Assistant Repeated One Reply Four Times: Debugging an OpenClaw WeChat Channel Issue</title>
				<link>https://blog.margrop.net/en/post/openclaw-wechat-duplicate-reply-debugging/</link>
				<pubDate>Fri, 29 May 2026 11:24:29 +0800</pubDate>
				<guid>https://blog.margrop.net/en/post/openclaw-wechat-duplicate-reply-debugging/</guid>
				<description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;Short version&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;The symptom looked like a messaging-channel bug: an AI assistant connected to a personal chat channel appeared to repeat the same reply multiple times. The real bug was earlier in the chain. Before the reply ever reached the message-sending layer, the OpenClaw agent had already produced duplicated visible text. The useful fix was not to patch the chat sender blindly, but to split the path into transport, session, model-routing, and provider layers, then compare the OpenAI-compatible gateway path with the native provider path. Once the faulty compatible provider candidate was removed from the visible model set and the personal IM channel was pinned to the native provider, the same minimal prompt returned exactly once.&lt;/p&gt;&#xA;&lt;p&gt;This post is deliberately privacy-safe. It contains no real internal addresses, account IDs, tokens, session IDs, personal chat identifiers, or private file paths. Configuration examples use placeholders. The value is the debugging method, not the private environment.&lt;/p&gt;&#xA;&lt;/blockquote&gt;</description>
			</item>
	</channel>
</rss>
