Skip to content

Releases: provos/llm-interface

v0.2.2

Choose a tag to compare

@provos provos released this 06 Sep 21:56
87b36fd

OpenAI Responses API

llm_from_config(provider="openai") now talks to the Responses API, where OpenAI's reasoning models allow reasoning together with function tools (Chat Completions only accepts tools with reasoning_effort="none"). Requests are stateless; the reasoning and function-call items of a tool turn are replayed with their encrypted content on the next round, so a model keeps its chain of thought across tool calls. Structured outputs use a strict json_schema text format. Pass openai_api="chat" for the Chat Completions wrapper.

Reasoning effort and usage accounting

  • llm_from_config(effort=...) reaches OpenAI as reasoning_effort; reasoning tokens are reported in TokenUsage.reasoning_tokens.
  • TokenUsage.cache_creation_tokens counts prompt-cache writes (Anthropic bills them at the cache-write rate).
  • For Anthropic, reasoning_tokens is estimated when a response carries thinking blocks: output tokens not accounted for by the visible text and tool calls.

Fixes

  • Chat Completions: parse() refuses non-strict function tools (any tool with an optional parameter); the wrapper falls back to create() with a strict json_schema response format.
  • Chat Completions: models that only accept function tools with reasoning_effort="none" get one retry with that value, remembered per model.
  • Provider rate limits (HTTP 429) are retried with a growing backoff instead of failing the request.
  • supports_structured_output understands dotted model versions such as gpt-5.6-luna.

v0.2.0

Choose a tag to compare

@provos provos released this 06 Sep 01:15
8b71e2f

What's Changed

  • Robust tool loop; streaming Anthropic requests with structured output and prompt caching by @provos in #1

New Contributors

  • @provos made their first contribution in #1

Full Changelog: v0.1.13...v0.2.0

v0.1.13

Choose a tag to compare

@provos provos released this 28 May 18:55

This releases fixes timeouts when using Google's Gemini API.

Fixes

  • convert timeouts into milliseconds as the Gemini API expects timeouts in ms (int) rather than the standard Python secs (float)
  • correctly pass the timeout from llm_from_config() to the GeminiWrapper

v0.1.12

Choose a tag to compare

@provos provos released this 19 May 17:00

This release exposes the Tool class as part of main llm_interface imports.

v0.1.11

Choose a tag to compare

@provos provos released this 13 May 01:17

v0.1.11 Release

Summary

This release adds overrides for JSON mode and structured outputs from llm_from_config

Features

  • When creating a new LLM Interface with llm_from_config() the caller can now override the inferred support for JSON mode or structured outputs.

v0.1.10

Choose a tag to compare

@provos provos released this 24 Apr 01:29

v0.1.10 Release

Summary

This release adds finer JSON control in the chat interface, and switches to the new GenAI model listing API with improved test coverage.

Features

  • Introduce an allow_json_mode flag in LLMInterface.chat and _cached_chat to let callers disable automatic JSON formatting for straight chat experience
  • Switch GeminiWrapper.list to use genai client.models.list() instead of the old client.list_models() call; expand unit tests for model conversion, message and tool translation, and chat handling.

v0.1.9

Choose a tag to compare

@provos provos released this 27 Mar 13:59

Release Notes

Summary

This release includes improved error handling with timeout and retry logic, support for image processing in LLM interactions and token usage tracking

Features & Enhancements

  • Timeout and Retry Logic: Added timeout parameters and retry mechanisms to deal with timeouts and connection failures.
  • Image Handling: Integrated image support across all providers for multi-modal models.
  • Token Tracking Improvements: Introduced a new TokenUsage class to track token consumption across different LLM calls.

Tests

  • Unit Tests: Added unit tests for token usage tracking in the LLMInterface
  • Regression Tests: Added regression tests for validating image functionality

v0.1.8

Choose a tag to compare

@provos provos released this 10 Mar 23:43

This release expands the number of model providers from Anthropic, Ollama and OpenAI to also include Gemini and OpenRouter.

Features

  • OpenRouter API Support: Integrated OpenRouter API into the LLM interface supporting both structured outputs and tool calling.
  • Gemini Integration: Added Gemini model support with support for structured outputs. Tool calling is not available in Gemini.

v0.1.7

Choose a tag to compare

@provos provos released this 06 Feb 18:46

Release Notes for LLM Interface v0.1.7

Overview

This minor release improves the resilience of the LLM interface and adds better model detection mechanisms.

Features

  • Structured Output Capability: Improved the matching of structured output capabilities of models based on their names and versions.
  • Thinking Process Integration: Introduced a requires_thinking attribute to the LLMInterface class, allowing models like Deepseek-R1 to document their 'thinking' process which is required when using Ollama with structured outputs.

Improvements

  • Error Handling: Error handling in the LLMInterface class when response caching fails.
  • Test Suite Reliability: Regression tests for structured output generation forces llm_client to use structured outputs.

v0.1.6

Choose a tag to compare

@provos provos released this 30 Jan 19:31

llm-interface 0.1.6 Release Notes

What's Changed

Testing

  • MockLLMResponse now also supports basic strings in addition to Pydantic objects

Bug Fixes

  • A long standing bug where the model name was not part of the cache key when temperature was not specified

Installation

pip install llm-interface==0.1.6