liveBook · Manning

Language model client interface

As explained in Vibe Engineering

A language model client interface is an abstraction that defines a common contract for invoking different language-model providers.

A language model client interface establishes one contract for invoking multiple providers while keeping provider-specific communication behind SDK-backed implementations. section 6.4.3

A practical contract exposes:

  • A provider identifier, such as openai or gemini. section 6.4.3
  • A readiness check indicating whether the client is configured and usable. section 6.4.3
  • A text-generation operation accepting an application prompt. section 6.4.3
  • Configuration-based provider selection, without silently switching providers after request failures. section 6.4.3

Configuration default versus runtime fallback

An application can default to OpenAI when ai.provider is absent, while explicitly selecting Gemini through configuration. If the selected provider fails, the request errors instead of switching providers and contaminating benchmark results. section 6.4.3

Listing 6.20 Setting the Gemini API properties
google:
  ai:
    api:
      key: ${GOOGLE_AI_API_KEY:}
    model: ${GOOGLE_AI_MODEL:gemini-2.5-flash} #A
 

Inspect the Gemini API-key and model configuration used by the provider-specific client. section 6.4.3

How Vibe Engineering covers it

How deep it goes
Defines provider identity, readiness, and response generation, then applies dependency injection without detailing each SDK implementation.
Examples
Uses OpenAI and Gemini clients, ai.provider configuration, Gemini SDK properties, and strict failure behavior during benchmarking.
What it assumes
Assumes an application already communicates with a language-model provider and teaches abstraction through an injected client contract.
What you can do after
Build provider-swappable language-model integration with explicit configuration and provider-pure benchmark measurements.
How it connects
Connects dependency injection, configuration management, provider selection, SDK integration, and benchmarking.

This explainer was generated by Manning's knowledge graph from the text of Vibe Engineering. The section links point to the parts of the book it draws on.