Files
xet-core/api_changes
Hoyt Koepke b43c0aec0e Move XetRuntime model away from thread-local statics (#801)
This PR moves the XetRuntime model away from using thread-local statics
and decouples the XetConfig and XetCommon structs from a single runtime.
It introduces a struct XetContext that gives the runtime context for
operations:

```
struct XetContext { 
    pub runtime : Arc<XetRuntime>,  // The current tokio runtime wrapper, minus the config and common objects..
    pub common : Arc<XetCommon>, // The common cache objects, semaphores, rate trackers, etc.
    pub config : Arc<XetConfig> // The config 
 }
 ```
 
Now, instead of using functions like `xet_runtime()` and `xet_config()` that examine the thread-local storage, we now explicitly passing through a XetContext instance from the session creation that gets stored in each major processing struct.  

This allows decoupling between the runtime, config, and common caches, especially: 
- Running multiple config settings and/or endpoints within the same pre-existing tokio runtime.
- Running multiple runtimes that share the same XetCommon object.
2026-04-21 09:17:19 -07:00
..

API changes

This folder contains a record of API changes in main. It's indended for AI agents to read in order to correctly apply merges or update dependencies and PRs.

The updates are listed by date in the form: update_<yymmdd>_<description>.md

When applying a merge, rebase, or downstream update, all AI agents should first scan this folder to understand what relevant information may need to be applied.

When creating a PR that involves an API change potentially requiring downstream updates, an AI agent should create such a file. This file should be humanly readable but contain enough information to correctly apply the needed changes without scanning the code.