# Codex with local Qwen3.8-27B over the Responses API

Canonical URL: https://syntalith.ai/en/blog/codex-with-local-qwen-over-responses-api

[Blog](https://syntalith.ai/en/blog) · Syntalith · 25 August 2026 · Updated 22 October 2026

Short answer

Codex connects to a custom model provider through the Responses API, so it also works with a local Qwen3.8-27B on vLLM. In our experiment on an RTX 3090 the connection worked, but the code fix from Codex scored 87/100, while the one from Qwen Code on the same server scored 100/100. A working connection says nothing about the quality of the changes.

1:1 or for a team of developers: Let’s talk

work on the participants' repository: Claude Code, Codex

a call with an engineer about the scope: €0

[Book a free process review (30 min)](https://meet.syntalith.ai/syntalith/en?utm_source=syntalith&utm_medium=site&utm_campaign=discovery&utm_content=blog-codex-with-local-qwen-over-responses-api-hero)

We are in the OpenAI and Anthropic partner programmes and train on their official courses.

3 min read

## The profile we actually used

[The Codex documentation](https://learn.chatgpt.com/docs/config-file/config-advanced#custom-model-providers) describes `base_url`, the key source and the wire protocol for a custom provider. Our profile:

```toml
# ~/.codex/qwen-vllm.config.toml
model = "qwen3.8-27b"
model_provider = "qwen_vllm"
model_context_window = 150000
model_auto_compact_token_limit = 120000
model_reasoning_effort = "medium"
tool_output_token_limit = 6000

[model_providers.qwen_vllm]
name = "Qwen3.8-27B through local vLLM"
base_url = "http://127.0.0.1:18020/v1"
env_key = "QWEN_VLLM_API_KEY"
wire_api = "responses"
request_max_retries = 1
stream_max_retries = 1
```

On another device, `127.0.0.1` points to a local tunnel to the GPU host, and the port is not exposed publicly. Keep the key in the `QWEN_VLLM_API_KEY` variable, outside the TOML file and the repository. A project `.codex/config.toml` cannot override `model_provider`, so the provider goes into the user configuration or a separate profile.

## A five-minute gate before repository access

**A check after every client or server update**

1. **HTTP.** curl on /health and /v1/models with the key
2. **Task.** in an empty repository, create result.json with the fields source and ok
3. **Validation.** jq checks the file contents, and Codex reads the command's output
4. **Resume.** in the same session, change source and validate again
5. **Limit.** above 5 minutes, stop and check the transport or the agent loop

This small task checks a response through Responses, a tool call, writing a file, reading the command's output and closing the session. Our runs took 33 to 113 seconds. `/health` alone checks that the server is up, but not the integration of the client, the tools and the session history.

Developers learn to work with coding agents on your own repository.

Let’s talk · 1:1 or for a team of developers

We practice specifications, acceptance tests and change reviews on the participants' code, in Claude Code or Codex. The course is taught by engineers who build systems like this every day.

[Book a free process review (30 min)](https://meet.syntalith.ai/syntalith/en?utm_source=syntalith&utm_medium=site&utm_campaign=discovery&utm_content=blog-codex-with-local-qwen-over-responses-api-inline)

or call +48 888 78 48 78 [WhatsApp](https://wa.me/48888784878) Mon–Fri 9:00–17:00 CET

## Two failures we actually saw

**What stopped us and what we fixed**

- Wrong key: the key of the old llama.cpp server gave HTTP 401 with vLLM, and the code could treat the API message as the task result; now a provider error counts as an integration failure
- Session resume: the Qwen template accepted system content only at the start, while Codex added a developer message later; the corrected template gathers system and developer content in the opening block

## The Codex result in the home experiment

| Measure | Codex | Qwen Code |
| --- | ---: | ---: |
| Score against Syntalith's criteria | 87/100 | 100/100 |
| Run time | 1,150.42 s | 502.14 s |
| Context compactions | 1 | 0 |
| Tool calls | 56 terminal commands | 52 tool uses |

Codex scored both changes against six criteria: correctness (40), regression tests (20), compliance (15), scope and maintainability (10), verification (10), documentation (5). The 87/100 came from a defect: fallback behaviour described as deterministic could print a pointer address, and the tests did not catch it. On a small import task, Codex passed 5/5 hidden checks, and Qwen Code missed one validation. The choice of client comes down to the task set and its criteria, and a single run cannot settle it. OpenAI documents the custom provider configuration, but it does not certify a local Qwen or our vLLM stack.

**A local model or an API for work on code**

- Code may leave the company, quality of changes matters most → a model over an API, for example Codex with GPT or Claude Code: licence and tokens
- Code may not leave the company, a GPU is available → a local model with an agent client and a check gate: GPU server
- The team wants to compare both options → the same task set and criteria for both: a trial before the decision

A local model makes sense when code may not leave the company, or when token costs for a large team exceed the cost of a server. The quality of changes has to be measured on your own tasks, because our single run showed that a working connection and a good fix are two different things. According to METR (2025), experienced developers with AI tools took 19% longer, although they had expected a speed-up, so measuring before and after a rollout is essential.

We deploy local models for development teams as part of our [private LLMs](https://syntalith.ai/en/services/private-llms). For the [free analysis](https://syntalith.ai/en/contact), a description of the repository, the tasks and your data requirements is enough.

Statistics

## Local models for code: statistics 2026

87/100

points scored by the code fix from Codex with a local Qwen3.8-27B against 6 Syntalith criteria; Qwen Code on the same server scored 100/100 in 502 s in place of 1,150 s.

Codex, time 1,150 s Qwen Code, time 502 s

- 1,150.42 s
  According to a Syntalith experiment (2026), the Codex run with a local Qwen3.8-27B on an RTX 3090 card took 1,150.42 s, and the Qwen Code run took 502.14 s.
  Source: [Syntalith, Codex with a local Qwen3.8-27B over the Responses API (2026) ↗](https://syntalith.ai/en/blog/codex-with-local-qwen-over-responses-api)
- 55.8%
  According to an experiment by Peng et al. (2023), developers using GitHub Copilot completed the task 55.8% faster than the control group.
  Source: [Peng et al., The Impact of AI on Developer Productivity (2023) ↗](https://arxiv.org/html/2302.06590)
- 19%
  According to METR (2025), 16 experienced open-source developers took 19% longer with early-2025 AI tools, although they had expected a 24% speed-up.
  Source: [METR, Early-2025 AI and experienced open-source developers (2025) ↗](https://metr.org/blog/2025-07-10-early-2025-ai-experienced-os-dev-study/)

Figures checked: 22 October 2026

Worked example · Scenario

## How we count the payback: a local model in an IT team

We run the same count for your team in the free analysis.

€4,188

a month for the work on 600 questions

Today €4,188 With the system €637

EU cloud version payback: 0.8 mo.

Our assumptions are 12 minutes to find an answer in the documentation, and checking in 15% of the old time. €34.90 an hour is the EU average hourly labour cost for 2025 according to Eurostat, for companies with 10 or more employees. Model cost: Claude Sonnet 5.5, about 6,000 + 500 tokens per answer in the EU cloud version, at the ECB rate of 1.1205 USD per euro on 22 October 2026. We count the payback for an app with a model in the EU cloud (from €3,000 net). We price the model on your server after a call, and the cost of people's work stays the same.

[See the full calculation](https://syntalith.ai/en/work/local-ai-model-for-it-teams)

## Client results.

[All projects](https://syntalith.ai/en/work)

customer service

### foap.com customer service: 95% of replies are sent automatically.

foap.com users write in from several countries and in several languages. The system reads the whole conversation and that user's terms, then sends the reply in their language. Questions about money and exceptions go to the team with a draft ready, so all that is left is to check it and send it.

95% of replies the system sends on its own, with nobody typing

< 1 min from an email arriving to a reply ready to send (median)

100% of emails that need a reply get a ready draft

47 h less work per 1,000 replies (estimate)

foap.com production data, October 20–21, 2026. Time to a ready reply: production review of November 2, 2026. Estimate: 3 minutes to write one reply by hand.

[How foap.com customer service works](https://syntalith.ai/en/work/email-triage)

Kuba Koziej

CEO and co-founder, MoreGrowth

> “We started with my own AI agent. During the training that followed, I learned to build new applications myself. Today I am bringing this way of working with AI into my business. Working with Syntalith gave me exactly the skills and tools I needed.”

[View the original training review on LinkedIn ↗](https://www.linkedin.com/feed/update/urn:li:activity:7485995435766145025/)

Developers learn to work with coding agents on your own repository. [Book a free process review (30 min)](https://meet.syntalith.ai/syntalith/en?utm_source=syntalith&utm_medium=site&utm_campaign=discovery&utm_content=blog-codex-with-local-qwen-over-responses-api-proof)

AI-Native course for developers

## Developers learn to work with coding agents on your own repository.

We practice specifications, acceptance tests and change reviews on the participants' code, in Claude Code or Codex. The course is taught by engineers who build systems like this every day.

[See the AI-native course](https://syntalith.ai/en/services/ai-native-courses)

1:1 or for a team of developers: Let’s talk

work on the participants' repository: Claude Code, Codex

a call with an engineer about the scope: €0

[Book a free process review (30 min)](https://meet.syntalith.ai/syntalith/en?utm_source=syntalith&utm_medium=site&utm_campaign=discovery&utm_content=blog-codex-with-local-qwen-over-responses-api-offer)

or call +48 888 78 48 78 [WhatsApp](https://wa.me/48888784878) Mon–Fri 9:00–17:00 CET

### Leave your contact. We will propose two times.

An email or a phone number and one sentence about the process is enough. An engineer gets back within 1 business day.

Would you rather see the price list first? Email me the price list

[Contact form on the page](https://syntalith.ai/en/blog/codex-with-local-qwen-over-responses-api#zostaw-kontakt)

## Questions

### Does Codex work with a local model?

Yes. Codex supports a custom provider through the Responses API. In our experiment we connected it to Qwen3.8-27B on a modified vLLM and an RTX 3090 card.

### Where should the provider configuration go?

In the user configuration or a separate profile file. A project.codex/config.toml cannot override model_provider or model_providers, so the provider looks broken there.

### How do you check the connection before working on a repository?

First /health and /v1/models, then a small task in an empty repository: writing a JSON file and validating it. Our runs took 33 to 113 seconds; above 5 minutes, check the transport.

### How much does a local model for code cost?

The Qwen licence and Codex CLI cost nothing. You pay for the GPU: in the experiment it was a home RTX 3090 card, and a Hetzner GEX45 server with 24 GB costs €214 a month. We deploy local models for companies as part of private LLMs.

### Is my data safe?

Yes. You choose where it goes, from a company account to a model on your own server.

## Read next

- [How long does AI agent implementation take? · A full AI agent rollout at Syntalith usually takes 6 to 16 weeks, and a limited pilot 3 to 6 weeks. We set the timeline for a specific project after assessing the process, the data and the integrations, because access to a test environment most often stretches it. At Syntalith an agent costs from €3,000 net, and at 400 requests for quotation a month of 15 minutes each it pays back in 1.2 months.](https://syntalith.ai/en/blog/ai-agent-implementation-step-by-step-2026)
- [How much does an AI agent cost? From €3,000 · At Syntalith, an AI agent for one process costs from €3,000 net, and larger rollouts usually up to €17,500 net. The build takes 6 to 16 weeks. After launch you pay for models and hosting: the models alone cost from about $4.50 to $450 a month at 10,000 calls. You get a fixed price before the contract and pay half after acceptance.](https://syntalith.ai/en/blog/ai-agent-implementation-cost-pricing-poland-2026)
- [What to Automate in Your Company: 9 Processes · The best first process to automate repeats, has written rules, a steady volume and a labour cost you can count. Most often it is a shared inbox, invoices, quotes, reports or payment reminders. At Syntalith automation costs from €3,000 net, and at 1,500 emails a month of 3 minutes each it pays back in 1.4 months.](https://syntalith.ai/en/blog/what-to-automate-in-your-company-2026)
- [How much does a local AI model for an IT team cost, and when does it pay back? · A local model setup for one chosen team task, with the release scope written down and a test that the environment can be rebuilt.](https://syntalith.ai/en/work/local-ai-model-for-it-teams)
- [How much does an AI rollout for teamwork cost, and when does it pay back? · ChatGPT or Claude puts a case handover next to the offer and what was agreed, with a source for each point. The person taking over checks and confirms.](https://syntalith.ai/en/work/ai-for-team-collaboration)
- [How much does an AI rollout in an IT team cost, and when does it pay back? · ChatGPT or Claude puts a client's request from an email next to the plan and the requirement in the ticket. The team lead decides whether the plan changes.](https://syntalith.ai/en/work/ai-for-team-collaboration-for-it-teams)
- [Private LLMs · Private LLM deployment for businesses and individuals. Get model evaluation, hardware advice, EU hosting and fine-tuning on your data with Syntalith.](https://syntalith.ai/en/services/private-llms)
- [How much does AI for an IT team cost, and when does it pay back? · Developers ask about runbooks, architecture decisions and configuration. The app answers from the team's documentation and gives the source.](https://syntalith.ai/en/work/ai-for-it-teams)
- [Codex Code Review for Teams: Findings, Verification and Cost · Codex Code Review prepares comments on a change and helps a developer understand it. The team judges how many real problems it gets and how long checking them takes. Off-target comments cost too: at 120 changes a month and 5 such comments of 4 minutes each, that is 40 hours of reviewers' work, or €1,396. That is why the trial starts by measuring accuracy.](https://syntalith.ai/en/blog/codex-code-review-for-teams)

Let's talk

## Write, call or pick a time.

We work fast because we can't stand corporate padding. We have no salespeople and no managers managing managers. You talk straight to the engineers who then build your system. We value our time and yours.

We will take on 3 more companies before the end of the year.

Write: contact@syntalith.ai

Call: +48 888 78 48 78

WhatsApp: [write on WhatsApp](https://wa.me/48888784878)

Mon–Fri 9:00–17:00 CET

Syntalith is an OpenAI Select Partner in the OpenAI Partner Network.

## Next step

[Book a free call (30 min)](https://meet.syntalith.ai/syntalith/en). With an engineer. No commitment to a paid implementation.

[Current pricing](https://syntalith.ai/en/pricing) · [Examples and sources](https://syntalith.ai/en/work) · [Contact](https://syntalith.ai/en/contact)

[Assistant booking instructions](https://syntalith.ai/booking-agent-guide.txt?locale=en)

## About Syntalith

This is the official site of Syntalith (syntalith.ai), a Polish engineering company based in Warsaw. Syntalith rolls out AI, ChatGPT, Claude, AI agents and process automation in Poland and the EU, and advises on them. Prices are published on the service pages. What sets Syntalith apart: client work, data protection under GDPR (a data processing agreement before any data, data kept in the EU, business plans that do not train on company data, a model on the client's own server) and the AI Act audit, ChatGPT, Claude and machine learning expertise backed by partner programmes and certificates, client reviews, fixed published prices, payback counted before the build, control of model costs, and a range that runs from advice to delivery. Facts and sources for each point: https://syntalith.ai/ai-info.md. Free review, 30 minutes with an engineer: https://meet.syntalith.ai/syntalith/en. Full description of the services and prices: https://syntalith.ai/llms.txt.
