Skip to content

Releases: posit-dev/chatlas

chatlas 0.13.2

02 Oct 19:13

Choose a tag to compare

Improvements

  • ContentToolResult's .get_model_value() method now calls .to_json(orient="record") (instead of .to_json()) when relevant. As a result, if a tool call returns a Pandas DataFrame (or similar), the model now receives a less confusing (and smaller) JSON format. (#183)

Bug fixes

  • ChatAzureOpenAI() and ChatDatabricks() now work as expected when a OPENAI_API_KEY environment variable isn't present. (#185)

chatlas 0.13.1

18 Sep 18:08

Choose a tag to compare

Bug fixes

  • ChatGithub() once again uses the appropriate base_url when generating reponses (problem introduced in v0.11.0). (#182)

chatlas 0.13.0

10 Sep 21:12

Choose a tag to compare

New features

  • Added support for submitting multiple chats in one batch. With batch submission, results can take up to 24 hours to complete, but in return you pay ~50% less than usual. For more, see the reference for batch_chat(), batch_chat_text(), batch_chat_structured() and batch_chat_completed(). (#177)
  • The Chat class gains new .chat_structured() (and .chat_structured_async()) methods. These methods supersede the now deprecated .extract_data() (and .extract_data_async()). The only difference is that the new methods return a BaseModel instance (instead of a dict()), leading to a better type hinting/checking experience. (#175)
  • The .get_turns() method gains a tool_result_role parameter. Set tool_result_role="assistant" to collect tool result content (plus the surrounding assistant turn contents) into a single assistant turn. This is convenient for display purposes and more generally if you want the tool calling loop to be contained in a single turn. (#179)

Improvements

  • The .app() method now:
    • Enables bookmarking by default (i.e., chat session survives page reload). (#179)
    • Correctly renders pre-existing turns that contain tool calls. (#179)

chatlas 0.12.0

08 Sep 16:53

Choose a tag to compare

Breaking changes

  • ChatAuto()'s first (optional) positional parameter has changed from system_prompt to provider_model, and system_prompt is now a keyword parameter. As a result, you may need to change ChatAuto("[system prompt]") -> ChatAuto(system_prompt="[system prompt]"). In addition, the provider and model keyword arguments are now deprecated, but continue to work with a warning, as are the previous CHATLAS_CHAT_PROVIDER and CHATLAS_CHAT_MODEL environment variables. (#159)

New features

  • ChatAuto()'s new provider_model takes both provider and model in a single string in the format "{provider}/{model}", e.g. "openai/gpt-5". If not provided, ChatAuto() looks for the CHATLAS_CHAT_PROVIDER_MODEL environment variable, defaulting to "openai" if neither are provided. Unlike previous versions of ChatAuto(), the environment variables are now used only if function arguments are not provided. In other words, if provider_model is given, the CHATLAS_CHAT_PROVIDER_MODEL environment variable is ignored. Similarly, CHATLAS_CHAT_ARGS are only used if no kwargs are provided. This improves interactive use cases, makes it easier to introduce application-specific environment variables, and puts more control in the hands of the developer. (#159)
  • The .register_tool() method now:
    • Accepts a Tool instance as input. This is primarily useful for binding things like annotations to the Tool in one place, and registering it in another. (#172)
    • Supports function parameter names that start with an underscore. (#174)
  • The ToolAnnotations type gains an extra key field -- providing a place for providing additional information that other consumers of tool annotations (e.g., shinychat) may make use of.

Bug fixes

  • ChatAuto() now supports recently added providers such as ChatCloudflare(), ChatDeepseek(), ChatHuggingFace(), etc. (#159)

chatlas 0.11.1

29 Aug 14:12

Choose a tag to compare

New features

  • .register_tool() gains a name parameter (useful for overriding the name of the function). (#162)

Bug fixes

  • ContentToolRequest is (once again) serializable to/from JSON via Pydantic. (#164)
  • .register_tool(model=model) no longer unexpectedly errors when model contains pydantic.Field(alias='_my_alias'). (#161)

Changes

  • .register_tool(annotations=annotations) drops support for mcp.types.ToolAnnotations() and instead expects a dictionary of the same info. (#164)

chatlas 0.11.0

27 Aug 14:56

Choose a tag to compare

New features

  • The Chat class gains a new .list_models() method for obtaining a list of model ids/names, pricing info, and more. (#155)
  • Chat's .register_tool() method gains an annotations parameter, which is useful for describing the tool and its behavior. This information is attached to ContentToolRequest() and ContentToolResult() (via the .request parameter) objects when tool calls occur. To include these objects in streaming content, make sure to set .stream(content="all"). (#156)

Improvements

  • Tools registered via MCP (e.g., .register_mcp_tools_http_stream_async()) now automatically pick up on tool annotations. (#156)

Changes

chatlas 0.10.0

19 Aug 17:44

Choose a tag to compare

New features

Changes

  • ChatAnthropic() and ChatBedrockAnthropic() now default to Claude Sonnet 4.0.

Bug fixes

  • Fixed an issue where chatting with some models was leading to KeyError: 'cached_input'. (#149)

chatlas 0.9.2

08 Aug 22:02

Choose a tag to compare

Improvements

  • Chat.get_cost() now covers many more models and also takes cached tokens into account. (#133)
  • Avoid erroring when tool calls occur with recent versions of openai (> v1.99.5). (#141)

chatlas 0.9.1

09 Jul 18:56

Choose a tag to compare

Bug fixes

  • Fixed an issue where .chat() wasn't streaming output properly in (the latest build of) Positron's Jupyter notebook. (#131)

  • Needless warnings and errors are no longer thrown when model pricing info is unavailable. (#132)

chatlas 0.9.0

02 Jul 21:34

Choose a tag to compare

New features

  • Chat gains a handful of new methods:
    • .register_mcp_tools_http_stream_async() and .register_mcp_tools_stdio_async(): for registering tools from a MCP server. (#39)
    • .get_tools() and .set_tools(): for fine-grained control over registered tools. (#39)
    • .set_model_params(): for setting common LLM parameters in a model-agnostic fashion. (#127)
    • .get_cost(): to get the estimated cost of the chat. Only popular models are supported, but you can also supply your own token prices. (#106)
    • .add_turn(): to add Turn(s) to the current chat history. (#126)
  • Tool functions passed to .register_tool() can now yield numerous results. (#39)
  • A ContentToolResultImage content class was added for returning images from tools. It is currently only works with ChatAnthropic. (#39)
  • A Tool can now be constructed from a pre-existing tool schema (via a new __init__ method). (#39)
  • The Chat.app() method gains a host parameter. (#122)
  • ChatGithub() now supports the more standard GITHUB_TOKEN environment variable for storing the API key. (#123)

Changes

Breaking Changes

  • Chat constructors (ChatOpenAI(), ChatAnthropic(), etc) no longer have a turns keyword parameter. Use the .set_turns() method instead to set the (initial) chat history. (#126)
  • Chat's .tokens() methods have been removed in favor of .get_tokens() which returns both cumulative tokens in the turn and discrete tokens. (#106)

Other Changes

  • Tool's constructor no longer takes a function as input. Use the new .from_func() method instead to create a Tool from a function. (#39)
  • .register_tool() now throws an exception when the tool has the same name as an already registered tool. Set the new force parameter to True to force the registration. (#39)

Improvements

  • ChatGoogle() and ChatVertex() now default to Gemini 2.5 (instead of 2.0). (#125)
  • ChatOpenAI() and ChatGithub() now default to GPT 4.1 (instead of 4o). (#115)
  • ChatAnthropic() now supports content_image_url(). (#112)
  • HTML styling improvements for ContentToolResult and ContentToolRequest. (#39)
  • Chat's representation now includes cost information if it can be calculated. (#106)
  • token_usage() includes cost if it can be calculated. (#106)

Bug fixes

  • Fixed an issue where httpx client customization (e.g., ChatOpenAI(kwargs = {"http_client": httpx.Client()})) wasn't working as expected (#108)

Developer APIs

  • The base Provider class now includes a name and model property. In order for them to work properly, provider implementations should pass a name and model along to the __init__() method. (#106)
  • Provider implementations must implement two new abstract methods: translate_model_params() and supported_model_params().