Testing code that calls an LLM: yes, you actually can
You cannot test the model, but you can test your code: snapshot the prompt as a golden file and mock the response to cover the ugly cases.

You cannot test the model, but you can test your code: snapshot the prompt as a golden file and mock the response to cover the ugly cases.

Five AI providers behind one Go interface, including one that shells out to a locally authenticated CLI for networks that allow no API calls.

Persisting an AI conversation in Go: snapshot the messages, prompt and tool metadata, and deliberately never the handlers or the API token.

Generate-and-hope does not work for codegen. Handing the draft to a repair agent with a fixed toolset that has to make build, test and lint pass.

Stop parsing an LLM's prose with regular expressions. Derive a JSON schema from your Go or Rust type so the schema and the type cannot drift.

Opt-in telemetry for a command-line tool: off until someone says yes, no personal data, a pluggable backend, and a consent flow that meets GDPR.

Tool calling and the reason-act-observe loop explained, and how to define a tool in Go so the schema comes from the type rather than by hand.

Documentation loses to --help on location, so embed the docs in the binary: a terminal browser and an assistant grounded only in your own pages.

BDD earns its place on narratives such as a lifecycle state machine, and nowhere else. Keep table-driven Go tests as the baseline everywhere.

You do not need LangChain in a command-line tool. A four-method chat interface can hide five providers, tool calling and structured output.
