qwen-coder-api / 1bomREADME.md
Erinaldorodrigues's picture
Rename README.md to 1bomREADME.md
9f4acae verified
|
Raw
History Blame Contribute Delete
2.75 kB

A newer version of the Gradio SDK is available: 6.24.0

Upgrade
metadata
title: Luna Max OpenAI API on Qwen2.5 Coder 7B
emoji: 🚀
colorFrom: green
colorTo: yellow
sdk: gradio
sdk_version: 6.22.0
python_version: '3.12'
app_file: app.py
pinned: false

This Space serves Qwen/Qwen2.5-Coder-7B-Instruct through a reliable OpenAI Chat Completions surface. gpt-5.6-luna-max is the public compatibility alias and behavior profile; it does not claim to contain another vendor's weights. The default code-specialized model has about 7.6B parameters, which reduces cold-start and generation cost substantially compared with the previous 30B FP8 checkpoint while retaining long-context coding support. The endpoint uses a configurable context window (16,384 tokens by default) and Qwen's function-calling-compatible template, returning OpenAI-compatible structured tool calls for OpenClaude. The same source supports both a GPU-backed Space and a CPU-only test Space; set DEVICE=cpu or DEVICE=cuda as a Space variable when selecting the runtime.

Set MODEL or MODEL_ID only when deliberately testing another compatible model. The Space uses the full model ID as its client-facing model name.

OpenClaude can use the Space directly, without a notebook-side chat proxy:

CLAUDE_CODE_USE_OPENAI=1
OPENAI_BASE_URL=https://erinaldorodrigues-qwen-coder-api.hf.space/v1
OPENAI_API_BASE=https://erinaldorodrigues-qwen-coder-api.hf.space/v1
OPENAI_API_KEY=hf_your_hugging_face_token
OPENAI_MODEL=gpt-5.6-luna-max
WEB_SEARCH_PROVIDER=custom
WEB_SEARCH_API=https://erinaldorodrigues-qwen-coder-api.hf.space/web-search
WEB_METHOD=GET
WEB_QUERY_PARAM=q

Using an hf_... token authenticates Hugging Face usage and, on the GPU Space, gives the request the quota and queue priority associated with that account. The public Spaces can also accept unauthenticated calls, subject to stricter shared limits.

The public compatibility surface is:

  • GET /health
  • GET /v1/models
  • POST /v1/chat/completions (JSON or OpenAI-compatible SSE)
  • GET /web-search?q=...

Every response includes an X-Request-ID header for correlating failures with the Space logs. /health reports the loaded backend model, profile, CUDA availability, device, and GPU name. Model inference runs in a worker thread so a slow generation does not block health checks or web-search requests.

The aliases gpt-5.6-luna-max, gpt-5.6-luna, and qwen-coder all route to the same Qwen backend. Use the first alias for the Luna Max profile; use qwen-coder when a client requires the historical model name.

Simple greetings such as ola/olá use a deterministic fast path and do not queue a full model inference. Tool catalogs are also omitted from ordinary conversation turns and retained when the request actually needs a tool.