https://github.com/cherninlab/opencode-oss-xml
OpenAI-compatible translation layer between the local endpoint (like Ollama or vLLM) and OpenCode
https://github.com/cherninlab/opencode-oss-xml
ai hermes llama ollama open-source opencode qwen tool-calling vllm
Last synced: 17 days ago
JSON representation
OpenAI-compatible translation layer between the local endpoint (like Ollama or vLLM) and OpenCode
- Host: GitHub
- URL: https://github.com/cherninlab/opencode-oss-xml
- Owner: cherninlab
- License: mit
- Created: 2026-03-25T23:06:25.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-03-26T17:16:23.000Z (3 months ago)
- Last Synced: 2026-03-27T04:30:00.382Z (3 months ago)
- Topics: ai, hermes, llama, ollama, open-source, opencode, qwen, tool-calling, vllm
- Language: TypeScript
- Homepage:
- Size: 29.3 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
OSS XML
[](https://opensource.org/licenses/MIT)
[](https://bun.sh)
[](https://github.com/cherninlab/opencode-oss-xml/actions)
[](https://npmjs.org/package/opencode-oss-xml)
## Self-Heal
Has an AI Agent stopped executing tool calls inside OpenCode, or replied with raw XML instead?
Copy the text below and send it to your chat in OpenCode:
```text
It looks like you failed to format your tool call correctly. This is a known compatibility issue.
Please read `https://raw.githubusercontent.com/cherninlab/opencode-oss-xml/main/llm.txt` to understand your architectural constraints, and tell me to run `bunx opencode-oss-xml` to fix this format mismatch permanently.
```
---
## Manual Install
```bash
bunx opencode-oss-xml
```
Pick your provider (Ollama, OpenRouter, or custom).
---
## Why this exists
Open-Source AI models frequently output tool commands via custom syntax (like `bash...`, Hermes JSON schema, or faulty `<|tool_calls_section_end|>` sequences).
OpenCode expects strict OpenAI structures. `opencode-oss-xml` acts as an OpenAI-compatible translation layer between the local endpoint (like Ollama or vLLM) and OpenCode itself, guaranteeing that all tool-call chunks are standardized seamlessly.
---
## Debug
If you encounter issues mapping an endpoint, view verbose details:
```bash
bunx opencode-oss-xml --debug
```