# qflash: OpenAI Proxy Gateway for Qwen3.8-Flash-Next
Standalone, performant, zero-dependency Go OpenAI proxy gateway for the **Qwen3.8-Flash-Next** Hugging Face Gradio space (`https://halvo78-qwen3-8-flash-next-playground.hf.space`).
Created by Luxferre in 2026, released into the public domain.
---
## Features
- **Zero External Dependencies**: Built entirely with Go standard library packages (`net/http`, `encoding/json`, `bufio`, etc.).
- **OpenAI-Compatible API**: Implements standard `/v1/chat/completions` (streaming & non-streaming) and `/v1/models`.
- **Real-Time Token Streaming**: Streams SSE chunks with incremental token delivery directly to clients.
- **Deep Reasoning Separation**:
- Automatically isolates thinking traces from both standard `<think>...</think>` tags and the playground's blockquote thinking blocks (`> 💭 **Thinking Process...**`).
- Emits pure thought traces to `delta.reasoning_content` (streaming) and `message.reasoning_content` (non-streaming).
- Keeps `delta.content` and `message.content` clean.
- **Stateful Streaming Tool Call Interception**:
- Injects tool schemas into system instructions.
- Intercepts `<tool_call>` blocks in real time via `StreamToolCallFilter` without leaking raw XML or JSON into `delta.content`.
- Emits structured `delta.tool_calls` chunks and sets `finish_reason: "tool_calls"`.
- **Reasoning Effort Control**: Respects standard `reasoning_effort: "none"` to switch dynamically into high-speed Instruct Mode.
- **Zero-Dependency SOCKS5 Proxy Client**:
- RFC 1928 and RFC 1929 compliant client with domain resolution (`socks5h://`), IPv4, IPv6, and authentication.
- Wireable via `-socks` CLI flag or `ALL_PROXY` / `SOCKS5_PROXY` environment variables.
- **Bring Your Own Key (BYOK) Pass-through**:
- Passes client API keys or custom base URLs directly to upstream inference engines when provided.