SwiftRelay

← All sprint notes

First Backend Lap with Qwen3.8 Max and Qwen3.7 Plus

Model splitsEN

Put Both Qwen Models on One Backend Task

A backend is the part of an application that checks requests, applies business rules, and reads or writes data. An AI model can help draft that code, explain unfamiliar patterns, and suggest tests. It cannot confirm that your application works without evidence from your actual environment.

For a first run with Qwen3.8 Max and Qwen3.7 Plus, give them different jobs on one small feature. Ask Qwen3.8 Max to propose the implementation, then ask Qwen3.7 Plus to review it. These are workflow assignments, not a claim that either model always performs better at a particular task.

Choose One Endpoint Before Opening the Pit Lane

Use a stock-reservation endpoint as your practice feature. A customer requests a quantity of an item; the backend reserves it only when enough stock remains. This is small enough to inspect, but it introduces real backend concerns: validation, authentication, database updates, and competing requests.

Before asking for code, write a short contract describing what the endpoint must do:

  • Request: Accept an item identifier and a positive whole-number quantity.
  • Identity: Get the customer identity from verified authentication, not from a customer identifier supplied in the request body.
  • Success: Create a reservation and return its identifier.
  • Failure: Reject invalid quantities, missing items, and insufficient stock with consistent error responses.
  • Safety: Keep stock from becoming negative when requests arrive together.

Also name your language, framework, database, and existing test runner. Without those details, a model may fill the gaps with choices that do not belong in your project.

Connect SwiftRelay Without Exposing Your Credentials

SwiftRelay is a practical way to access both models through one relay. With an OpenAI-compatible SDK, set the base URL to https://api.fastapirelay.com/v1 and load your API key from an environment variable. Keep that key out of source control, browser code, and prompts.

Use the exact model identifier shown in your SwiftRelay account rather than guessing it from the display name. If you work through Claude Code or Gemini CLI instead, those tools take the bare host, https://api.fastapirelay.com, without the SDK suffix.

Sign up for SwiftRelay to try this workflow with the small gift credit provided to new accounts. Usage is billed per token, so keep requests focused and inspect usage as you experiment.

Ask Qwen3.8 Max for a Small, Inspectable Patch

Start with a prompt such as: Implement the stock-reservation endpoint using the contract below and our existing project conventions. First list assumptions and questions. Then propose the smallest patch, including tests. Do not add dependencies without explaining the need.

Include only relevant files: the route, authentication interface, database schema, and a representative test. Remove credentials and real customer information. Review the proposed assumptions before accepting code, especially any assumption about how database transactions prevent competing requests from reserving the same stock.

Give Qwen3.7 Plus a Separate Review Checklist

Send the contract and proposed patch to Qwen3.7 Plus. Ask for review rather than an automatic rewrite: Identify correctness and security problems. For each finding, explain the failing scenario and suggest a test that would expose it. Separate confirmed issues from questions that require more project context.

Direct attention to negative quantities, missing authentication, database failures, and simultaneous reservations. Also ask what happens when a client retries after losing the response. Preventing duplicate reservations may require an idempotency key: a request identifier the backend remembers so a repeated request does not create another reservation.

Finish the Lap with Tests You Can Run

Treat model disagreement as a reason to investigate, not as a vote. Run formatting checks, type checks, and tests in a local or isolated environment. Add a database-backed test for competing reservations; a mocked database alone cannot demonstrate that the real update is safe.

Accept the patch only after you understand its transaction behavior, error responses, and retry policy. The useful finish line is not two models agreeing. It is a small change you can explain, test, and maintain.

Keep reading

Back for another lap?Log in