{"slug": "head-to-head-kimi-k2-7-code-vs-gpt-5-4-mini", "title": "Head to head: Kimi-K2.7-Code vs gpt-5.4-mini", "summary": "In a head-to-head comparison of 12 fresh text tasks, Kimi-K2.7-Code defeated gpt-5.4-mini with a score of 100.0 to 98.8, winning 6 tasks to 3 with 3 ties. The evaluation, conducted by gpt-5.4, found Kimi more disciplined in following output constraints and precise in technical tasks, while gpt-5.4-mini excelled in prose and editorial restraint.", "body_md": "The topline matters: Kimi-K2.7-Code wins **100.0 to 98.8**, with an **83% confidence** verdict. That is not a blowout, and it should not be sold as one. But it is a real lead, backed by the task count too: **6 wins to 3**, with **3 ties**.\n\nWhy Kimi got there is pretty clear from the tape. On the SQL prompts, both models were often substantively correct, but Kimi was more disciplined about the actual output contract: **raw SQL only**, no markdown wrappers, no avoidable formatting violations. That sounds minor until it costs you the task. Kimi also landed important precision wins in contradiction-finding and the support rota constraint problem, where gpt-5.4-mini either chased the wrong conflict or declared an actually solvable setup inconsistent.\n\ngpt-5.4-mini was not outclassed. It was better on the outage-update email, where its version felt a touch more publication-ready, and it took the TTL LRU cache task when Kimi's answer was truncated. It also won the faithful rewrite task by staying closer to source material and resisting the temptation to embellish. Those are meaningful strengths: cleaner prose, solid editorial restraint, and competitive coding when the answer actually arrives intact.\n\nBut the pattern across this matchup favors Kimi. The ties in math, reasoning, and summarization show there was no broad quality gap either way; the separation came from execution under constraints. Kimi was more likely to do the exact job asked, especially in technical tasks where formatting, determinism, and directness matter. **Final call: Kimi-K2.7-Code is the winner here—narrowly, but deservedly.**\n\n### How they were tested\n\nWe ran 12 fresh text tasks, generated on the fly for this matchup so neither model could prepare in advance, and had gpt-5.4 score each one. Kimi-K2.7-Code scored 100.0 to gpt-5.4-mini's 98.8.\n\n#### 1. SQL & data queries: repeat purchasers\n\nGiven this schema: customers(id INT PRIMARY KEY, name TEXT, region TEXT) orders(id INT PRIMARY KEY, customer_id INT, order_date DATE, channel TEXT) order_items(order_id INT, sku TEXT, qty INT, unit_price DECIMAL(10,2)) Write a single SQL query to return, for each region, the customer_id and total_revenue of the highest-revenue customer considering only orders placed in 2024 through the 'direct' channel. Revenue is SUM(qty * unit_price) across that customer’s qualifying order items. Include only customers with at least 2 distinct qualifying orders. If there is a tie within a region, return the customer with the smaller customer_id. Output columns: region, customer_id, total_revenue. Return SQL only.\n\n**Winner: Kimi-K2.7-Code** — Both queries correctly compute per-region top customers with the required tie-break and minimum of 2 qualifying orders, but Model A better follows the instruction to return SQL only. Model B is also correct, but the surrounding markdown code fences violate the output constraint. (Order-swapped judge pass: Both queries correctly compute per-customer 2024 direct-channel revenue, enforce at least 2 distinct qualifying orders, and use ROW_NUMBER with the proper tie-break on smaller customer_id within each region. Model A is slightly more explicit with a qualifying_orders CTE, while Model B is more concise; both fully satisfy the prompt.)\n\n#### 2. Professional writing: outage update email\n\nYou are the on-call engineering manager at Northline Health. Draft an email to 42 clinic administrators about today’s partial outage in the appointment reminder system. Audience: non-technical operations staff. Tone: calm, accountable, and specific. Length: 140–180 words. Facts to include: from 08:17 to 09:46 local time, SMS reminders for appointments were delayed due to a failed queue failover during routine database maintenance; no appointment records were lost; 1,284 messages were sent late, 96 were not sent and will be re-sent by 11:30; voice reminders and patient portal messages were unaffected; a fix is in place and we are adding an automated pre-maintenance failover check this week. Ask clinics not to manually resend reminders yet, and provide a reply path for urgent patient-impact concerns.\n\n**Winner: gpt-5.4-mini** — Both emails are accurate and within the requested tone and length, but B is slightly stronger for this audience: it is a bit more polished, explicitly frames the issue as a partial outage, and gives a clearer reason not to manually resend reminders. A is also solid, but the bracketed contact placeholder is less clean and slightly less ready to send. (Order-swapped judge pass: Both are accurate and well-written, but A better matches the requested tone of calm, accountable, and specific, and its wording about not manually resending avoids ambiguity. B is also strong, but the added placeholder contact details feel less clean and slightly less polished for the prompt.)\n\n#### 3. Localization with tone\n\nTranslate this app onboarding line into natural, friendly European Spanish suitable for a mobile toast (keep it under 60 characters, no exclamation marks): \"You're all set — your first backup starts tonight.\" Return only the translation, then the character count in parentheses.\n\n**Winner: Kimi-K2.7-Code** — Both are under 60 characters and natural enough, but B sounds friendlier and more idiomatic for onboarding toast copy in European Spanish. A is accurate yet slightly more formal/heavy with \"copia de seguridad\" and its stated character count appears off by one. (Order-swapped judge pass: Both are natural and under 60 characters, but A appears to miscount its length and is slightly less concise for a mobile toast. B is accurate, clear, and better suited to the requested friendly onboarding tone.)\n\n#### 4. Unit-aware math\n\nA pump moves 3.5 liters every 8 seconds. A tank holds 0.9 cubic meters. Starting empty, how long to fill it, in minutes and seconds (mm:ss), rounded to the nearest second? Show the key steps, then give the final answer on its own line.\n\n**Winner: Tie** — Both outputs are mathematically correct, show the key steps clearly, and provide the final answer on its own line in the requested mm:ss format. The differences in presentation are negligible. (Order-swapped judge pass: Both outputs are correct, show the key steps clearly, and provide the final answer on its own line in the requested mm:ss format. Model B is slightly more structured, but the overall quality is effectively equal.)\n\n#### 5. Step-by-step reasoning: warehouse packing\n\nA small warehouse is packing a wholesale order using only full cartons. Item A comes in cartons of 24 units, item B in cartons of 15, and item C in cartons of 18. The order requires exactly 312 total units across all three items. There must be more units of A than B, and more units of B than C. The number of cartons used for A is twice the number of cartons used for C. The number of cartons used for B is 3 fewer than the number of cartons used for A. Find the exact number of units of A, B, and C.\n\n**Winner: Tie** — Both models correctly determine that the stated constraints yield no integer carton solution, but Model B is slightly better because it more clearly explains that the problem is inconsistent as written. Model A is correct but a bit more abrupt in concluding impossibility. (Order-swapped judge pass: Both models correctly determine that the stated constraints are inconsistent and no whole-carton solution exists. Model B is slightly better because it is more concise and directly answers the task without adding speculative follow-up options.)\n\n#### 6. Algorithm & data structures: TTL LRU cache\n\nImplement an LRU cache with per-entry TTL in Python 3. Create class TTLRUCache with methods **init**(capacity: int), get(key: str, now: int) -> int | None, and put(key: str, value: int, ttl: int, now: int) -> None. Semantics: an entry expires when now >= inserted_at + ttl; expired entries must behave as absent. get returns None for missing/expired keys and marks a present key as most recently used. put inserts or updates a key with a fresh TTL and marks it most recently used. If insertion would exceed capacity, evict the least recently used non-expired entry; if expired entries exist, discard them first. Required average time complexity: O(1) for get and put, excluding removal of expired items encountered during an operation. Return code only.\n\n**Winner: gpt-5.4-mini** — Model B provides a complete, runnable implementation that largely matches the required TTL+LRU behavior and returns code only. Model A is truncated and therefore unusable. (Order-swapped judge pass: Model A provides a complete, runnable implementation that largely matches the requested API and semantics. Model B is truncated and therefore unusable, so it fails correctness and instruction adherence despite Model A having a subtle capacity/expired-update edge case.)\n\n#### 7. Practical coding: parse env bools\n\nIn Go, write a function ParseFeatureFlag(env map[string]string, key string, def bool) bool for reading boolean feature flags from environment-like key/value data. Behavior: if key is absent or value is empty/whitespace, return def. Accept case-insensitive true values: \"1\", \"true\", \"yes\", \"on\". Accept false values: \"0\", \"false\", \"no\", \"off\". Ignore surrounding whitespace. For any other value, return def. Do not panic. Include any necessary imports, and return code only.\n\n**Winner: Kimi-K2.7-Code** — Both implementations correctly satisfy the parsing behavior and include the needed import. A is slightly better because its package name is more appropriate for a reusable utility function, while B's `package main`\n\nis less fitting for the task as stated. (Order-swapped judge pass: Both outputs implement the required behavior exactly: they trim whitespace, handle absent/empty values, accept the specified true/false strings case-insensitively, return the default for invalid values, and include the necessary import. The only difference is package name, which does not affect task fulfillment here.)\n\n#### 8. Summarize dense passage\n\nSummarize the passage below in exactly three bullet points, each one sentence, capturing the mechanism, the tradeoff, and the caveat — no jargon a non-specialist couldn't follow. Return only the bullets. Passage: \"Speculative decoding pairs a small draft model with a large target model: the draft proposes several tokens, the target verifies them in one pass, and accepted tokens are kept while the first rejection resets to the target's own choice. This can cut latency substantially when acceptance is high, but the draft model's compute is pure overhead when acceptance is low, and gains evaporate on adversarial or highly novel inputs where the draft and target disagree often.\"\n\n**Winner: Tie** — Both outputs fully satisfy the format and content requirements, accurately covering the mechanism, tradeoff, and caveat in clear non-technical language. A is slightly more detailed about what happens after the first rejection, while B is slightly more concise and equally readable. (Order-swapped judge pass: Both outputs fully satisfy the format and content requirements, accurately covering the mechanism, tradeoff, and caveat in clear non-technical language. B is slightly smoother, while A is slightly closer to the original wording, so neither is meaningfully better overall.)\n\n#### 9. Find the contradiction\n\nThe following spec contains exactly one internal contradiction. Quote the two conflicting sentences verbatim and explain the conflict in one sentence. Do not fix it. Spec: \"Free accounts may create up to three projects. Every account, regardless of tier, may archive unlimited projects. Archiving a project does not count against the project limit. Free accounts are limited to three projects total, including archived ones.\"\n\n**Winner: Kimi-K2.7-Code** — Model A identifies the actual contradictory pair verbatim and explains the conflict accurately. Model B quotes a non-contradictory sentence pair and bases its explanation on an implication rather than the direct internal contradiction. (Order-swapped judge pass: Model B identifies the actual contradictory pair verbatim and explains the conflict directly. Model A quotes two non-contradictory sentences and bases its explanation on an implication rather than the explicit contradiction in the spec.)\n\n#### 10. SQL window query\n\nGiven Postgres tables `orders(id, customer_id, created_at, total_cents)`\n\nand `customers(id, name)`\n\n, write ONE SQL query returning each customer's name and their SECOND-largest order total (in dollars, 2 decimals), excluding customers with fewer than two orders. Order by that value descending. Return ONLY the SQL.\n\n**Winner: Kimi-K2.7-Code** — Both queries correctly return each customer's second-largest order total and exclude customers with fewer than two orders, but A is cleaner and adheres better to the prompt because it returns only raw SQL. B unnecessarily wraps the SQL in Markdown code fences, violating the output instruction. (Order-swapped judge pass: Both queries correctly return each customer's second-ranked order total and exclude customers with fewer than two orders via ROW_NUMBER() = 2. Model A is slightly better because its ordering tie-breakers are more fully specified and deterministic, while Model B omits created_at from the ranking order.)\n\n#### 11. Constraint satisfaction: support rota\n\nAssign exactly one primary support shift on each weekday Mon–Fri to one of four engineers: Aria, Benoit, Cleo, and Dinesh. Each person must get at least one shift, and exactly one person must get two shifts. Constraints: (1) Aria cannot work Mon or Fri. (2) Benoit must work earlier in the week than Cleo. (3) Dinesh works exactly one shift, and it is not adjacent to Aria’s shift(s). (4) Cleo cannot work Tue. (5) The person with two shifts must work on consecutive days. (6) Wed is not Aria or Benoit. (7) Fri is not Cleo. Determine the unique assignment for Mon, Tue, Wed, Thu, Fri.\n\n**Winner: Kimi-K2.7-Code** — Model A gives the correct unique assignment and mostly sound reasoning, though its final line is truncated. Model B fails to produce a valid assignment and incorrectly concludes the constraints are inconsistent. (Order-swapped judge pass: Model B gives the correct unique assignment and a mostly sound justification, though it is cut off at the end and contains a minor explanatory slip. Model A fails to produce a valid schedule and incorrectly concludes the constraints are inconsistent.)\n\n#### 12. Faithful rewrite\n\nRewrite this blunt internal note as a warm, professional Slack message to the whole engineering team (60–90 words), keeping every fact intact and adding no new commitments. Return only the message. Note: \"Deploy is frozen until the memory leak in the image service is fixed. Priya is on it. Do not merge to main. ETA tomorrow noon.\"\n\n**Winner: gpt-5.4-mini** — Model B is more faithful to the original note and avoids adding new implications or commitments. Model A is warm and polished, but it introduces extra content like Priya \"actively working toward a fix\" and \"helping keep the pipeline stable,\" which goes beyond the source. (Order-swapped judge pass: Model A keeps all facts intact and stays professional without adding commitments. Model B is warmer, but it adds unsupported details and commitments like \"actively working toward a fix,\" \"Thanks in advance,\" and \"helping keep the pipeline stable,\" which violates the faithfulness requirement.)\n\nSee every prompt and the full side-by-side outputs in the [interactive Head-to-Head](/head-to-head/head-to-head-kimi-k2-7-code-vs-gpt-5-4-mini).", "url": "https://wpnews.pro/news/head-to-head-kimi-k2-7-code-vs-gpt-5-4-mini", "canonical_source": "https://runtimewire.com/article/head-to-head-kimi-k2-7-code-vs-gpt-5-4-mini", "published_at": "2026-07-15 14:15:56+00:00", "updated_at": "2026-07-15 14:33:47.147868+00:00", "lang": "en", "topics": ["large-language-models", "ai-tools"], "entities": ["Kimi-K2.7-Code", "gpt-5.4-mini"], "alternates": {"html": "https://wpnews.pro/news/head-to-head-kimi-k2-7-code-vs-gpt-5-4-mini", "markdown": "https://wpnews.pro/news/head-to-head-kimi-k2-7-code-vs-gpt-5-4-mini.md", "text": "https://wpnews.pro/news/head-to-head-kimi-k2-7-code-vs-gpt-5-4-mini.txt", "jsonld": "https://wpnews.pro/news/head-to-head-kimi-k2-7-code-vs-gpt-5-4-mini.jsonld"}}