SShortSingh.
Back to feed

Why .NET chat loops lose OpenAI encrypted reasoning between turns

0
·9 views

A reasoning model can appear to forget the first turn of a conversation, and the cause is often in the application's own chat loop rather than the prompt or model. When stateless requests ask for encrypted reasoning, the response includes an encrypted reasoning item that the service does not store, so it must be sent back on the next turn. In Microsoft.Extensions.AI, this data sits in TextReasoningContent parts, which are separate from the plain text the response exposes. Developers who save only the response text in their history discard this encrypted reasoning, so the follow-up request carries no prior reasoning items. The author demonstrates the problem with an offline .NET sample and tests, and recommends appending the entire response to the history instead.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

How to Inventory Every Third-Party Origin a Page Contacts, and Four Pitfalls to Avoid

Safari 27 now blocks a category of third-party domains by default at the network level, leaving many teams unsure whether their pages depend on such domains. Those domains often arrive through tag managers or marketing vendors, so repository inspection and one-off network panel checks give an incomplete picture. The article recommends using the browser's Resource Timing API to list fetched origins, with a PerformanceObserver to avoid the default 250-entry buffer limit. For production-wide coverage, it suggests a Content-Security-Policy-Report-Only header with a deliberately restrictive connect-src and a report-to destination, which reports outbound connections without blocking them. The author warns of four traps: the small buffer, a missing report-to directive that silently does nothing, incomplete browser support for report-to, and the header being unavailable from within an HTML meta tag.

0
ProgrammingDEV Community ·

Planet Zoo 2 Lists 130 Animal Species Across 12 Regions, With Three Regions Holding One Animal Each

Planet Zoo 2 launched on 13 October 2026 with 130 species, but the game offers no index view showing which animals come from which regions. A community creator exported the underlying data and published a public, CC BY 4.0 list grouped by region. The regional counts overlap because many species belong to several regions, so the totals exceed 130. The Hawksbill Turtle appears in nine regions, while the Arctic has only one land animal, the Mountain Hare. The author stresses that region is only a planning guide, since housing compatibility depends on biome and enclosure type.

0
ProgrammingDEV Community ·

N-CODE LazyFlow AI: Open-Source Daily Planner Built on Local Gemma 3

Developer Deshan built LazyFlow AI, an open-source productivity assistant that turns messy to-do lists into prioritized daily plans. Users enter their tasks, choose an energy level, and set the time available, and the tool suggests time allocations, a small first step, and tasks that can wait. The app runs locally using Ollama and Google's open-weight Gemma 3 1B model, so task data stays on the user's machine instead of a cloud API. The project was submitted to the Hacktoberfest Open-Source AI Challenge, and GitHub Actions logs reportedly show the real model producing a nonempty plan through the app's API. The code is released under the MIT License, though the time-saving benefit has not yet been measured in formal user testing.

0
ProgrammingDEV Community ·

Why Developers Should Investigate Ideas Before Building Them

The article argues that developers often rush into implementation because building feels more productive than researching a problem. It notes that ideas can stem from frustrations, trends, or existing products, but none of these guarantees a real opportunity. The author stresses that different audiences have different needs, using appointment scheduling for large companies versus independent mechanics as an example. It also cautions that a working product can still fail economically or depend on resources that are hard to access. Finally, the piece suggests that improving an existing solution with better usability or affordability can be valuable without reinventing an industry.