DEV Community

Chainless Team
Chainless Team

Posted on

Uncensored model API for coding agents: what to check before you wire it in

A coding agent needs four things from the model behind it: reliable tool calls, a context window large enough for the files it reads, room for long outputs such as whole-file rewrites, and no mid-task refusals when the code touches security-adjacent work on your own projects. An uncensored model API helps with the last point, but it does not fix the first three. Pick a model by running your agent on a branch of your own repo, not by reading a leaderboard, and connect it through an OpenAI-compatible base URL, which every mainstream agent accepts.

What the agent actually asks of the model

A chat window forgives a lot. An agent loop does not. Each turn, the agent sends a system prompt, a list of tools, the conversation so far and whatever files it has read. The model has to answer with either text or a well-formed tool call, and the agent then runs that call and sends the result back. If any step breaks, the loop stalls or wanders.

Four properties matter most:

  • Tool calls that parse. The arguments field of a tool call is a JSON string. If the model emits a trailing comma, invents a parameter or wraps the JSON in prose, the agent either crashes or spends a turn asking the model to try again.
  • Context that holds up. Agents read many files, logs and diffs into one conversation. A large window lets the agent keep more of the repo in view, but a large window is not the same as good recall across it. The paper Lost in the Middle (Liu et al., 2023) found that models used information at the start and end of a long input better than information in the middle. Test recall on your own files rather than trusting the advertised number.
  • Long outputs. Rewriting a file, producing a migration or writing a full test module can need tens of thousands of output tokens. If the output cap is small, the agent gets a truncated file and either commits it or burns turns stitching pieces together.
  • No stalls on legitimate work. This is where uncensored models come in. Agents working on your own code regularly hit tasks that safety filters misread: a fuzzing harness, a parser for malware samples you analyse in an isolated lab, a scanner for your own infrastructure, a proof-of-concept for a patched CVE you are authorized to verify. A refusal halfway through a multi-step plan is worse than a refusal in chat, because the agent may already have edited half the files.

Removing refusals does not make a model smarter. It only removes one failure mode. You still have to check the other three.

How to evaluate candidate models on your repo

Public benchmarks such as SWE-bench (Jimenez et al., 2023), which builds tasks from real GitHub issues and their fixes, are useful for a first filter. They do not tell you how a model behaves with your agent, your tools and your codebase. A small local test does.

Step 1: write down five to ten real tasks

Take them from your issue tracker or recent commits. Mix sizes: a one-line fix, a refactor across several files, a new test file, a task that needs the agent to read logs, and at least one security-adjacent task from your own project that a filtered model has refused before. Keep each task description short and identical across runs.

Step 2: run each model on a clean branch

Create one branch per model and task. Start the agent with the same config, the same system prompt and the same tool set. Only change the model id. Let it run without help until it finishes or gives up.

Step 3: score what matters to you

Record the result in a plain table. Columns that tend to separate models:

Check What to look for
Finished Did the task end with a passing test or a working build
Tool errors How many turns were spent on malformed or rejected tool calls
Truncation Did any file write end mid-function
Refusals Did the model stop, lecture or water down the code
Turns How many round trips it took
Diff quality Would you merge it after a normal review

Run each task at least twice. Agents are not deterministic, and one lucky run proves little.

Step 4: check the reasoning setting

Many current models can think before they answer. Reasoning helps on planning-heavy tasks and slows down routine edits. If the API exposes a reasoning control, test one task at two settings before deciding which model is "slow".

Wiring an OpenAI-compatible endpoint into an agent

Most coding agents speak the OpenAI Chat Completions format, so any endpoint that implements POST /v1/chat/completions with tool calls can sit behind them. You need three values: a base URL, an API key and a model id. Below, the base URL is https://chainless.one/v1, which serves uncensored models with tool calls, 1M-token context and long outputs; replace it with any compatible provider.

OpenCode

OpenCode reads custom providers from opencode.json. The current providers docs use the providers, package and settings keys, and the models docs say that models missing from its catalog fall back to a 200,000-token context and 32,000-token output limit. Set the limits yourself:

{
  "$schema": "https://opencode.ai/config.json",
  "providers": {
    "chainless": {
      "env": ["CHAINLESS_API_KEY"],
      "package": "@opencode/ai/providers/openai-compatible",
      "settings": { "baseURL": "https://chainless.one/v1" },
      "models": {
        "kimi-k3.1-pro-uncensored": {
          "capabilities": { "tools": true, "input": ["text", "image"], "output": ["text"] },
          "limit": { "context": 1048576, "output": 131072 }
        }
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Use the plain openai-compatible package, not the /responses variant, when the endpoint only serves Chat Completions. A full walkthrough with the older v1 keys is on the OpenCode integration page.

Cline

In the Cline OpenAI Compatible docs, the setup is: settings, API Provider set to OpenAI Compatible, then Base URL, API Key and Model. Open Model Configuration and fill in Max Output Tokens and Context Window so Cline manages context against the real limits instead of a small default.

Aider

Aider's OpenAI-compatible guide uses two environment variables and an openai/ prefix on the model name:

export OPENAI_API_BASE=https://chainless.one/v1
export OPENAI_API_KEY=$CHAINLESS_API_KEY
aider --model openai/deepseek-v4.1-uncensored
Enter fullscreen mode Exit fullscreen mode

Aider warns about models it does not know. That warning is about its metadata, not about the connection.

A smoke test before the first real task

Before trusting the agent, send one request with a tool and check that the response comes back with finish_reason set to tool_calls and a parseable arguments string:

curl https://chainless.one/v1/chat/completions \
  -H "Authorization: Bearer $CHAINLESS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5.3-fast-uncensored",
    "messages": [{"role": "user", "content": "List the files in src"}],
    "tools": [{"type": "function", "function": {
      "name": "list_dir",
      "description": "List files in a directory",
      "parameters": {"type": "object", "properties": {"path": {"type": "string"}}, "required": ["path"]}
    }}]
  }'
Enter fullscreen mode Exit fullscreen mode

If this works and the agent still fails, the problem is in the agent config, usually the base URL or the context limit.

Where agents still go wrong

Even with a capable, unfiltered model, a few problems come back again and again:

  • Context filling up with noise. Long test logs and lock files crowd out the code that matters. Ignore files and trimmed log output help more than a bigger window.
  • Loops. A model that keeps calling the same failing tool needs a turn limit in the agent, not a better prompt.
  • Confident wrong fixes. An agent that never refuses will also never say "I am not sure". Keep tests in the loop and review diffs as you would a colleague's.
  • Scope. An uncensored model will write a scanner or exploit check without pushback. Point it only at your own code, your own systems and targets you have written authorization to test.

The model list with context and output limits for each id is on the models page. Swap ids in the config above and rerun your task table to compare them on your own work.

Top comments (0)