litellm/.github/workflows
devin-ai-integration[bot] 0abd9267c1
feat(tokenizer): preserve Python defaults with opt-in Rust dispatch (#42174)
* ci: benchmark and gate an installed release wheel

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* ci: simplify installed-wheel benchmark check

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* feat(rust): add native tokenizer codec

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* refactor(tokenizer): route Python tokenization through the Rust extension

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* style(lint): format tokenizer call

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(packaging): restore runtime dependencies and native images

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(tokenizer): preserve Python SDK behavior with Rust tokenizers

* fix(tokenizer): restore compatibility paths

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* refactor(tokenizer): count custom tokenizers directly

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(tokenizer): preserve caller-supplied Python tokenizer counts

* fix(tokenizer): reuse packaged vocabularies in the native wheel

* refactor(rust_bridge): route token counting through the catalog as RUST_OPT_IN

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(spend_tracking): compare tokenizer groups by value

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* chore(deps): re-resolve filelock under the <4.0 pin

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(llms): align transformation override signatures with base configs

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* build(rust): use fat LTO to keep the native wheel under the 35 MB limit

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* feat(tokenizer): preserve Python defaults with opt-in Rust dispatch

* test(proxy): tolerate missing litellm.utils.Tokenizer when patching it

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(proxy): patch the tokenizer dispatch function instead of the removed alias

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* feat(tokenizer): give the Rust wrappers the tiktoken and tokenizers surface

Callers of litellm.encoding and litellm.create_tokenizer must see the same
read-only API whichever backend the catalog selects.

- OpenAIEncoding mirrors tiktoken.Encoding: n_vocab, max_token_value,
  token_byte_values, encode_single_token, encode_with_unstable,
  encode_to_numpy, decode_with_offsets, is_special_token, repr; the Rust
  tiktoken crate keeps a Vocabulary beside each CoreBPE and reports the
  requested encoding name (gpt2 stays gpt2).
- HuggingFaceTokenizer mirrors the read-only tokenizers.Tokenizer surface
  (token_to_id, id_to_token, get_vocab, get_vocab_size,
  get_added_tokens_decoder, num_special_tokens_to_add, padding, truncation,
  encode_special_tokens, from_buffer); HuggingFaceEncoding gains the
  char/word/token lookups, pad, truncate, set_sequence_id and merge.
  Mutators stay on the Python tokenizer.
- from_json/from_pretrained claim the fork gate only when the huggingface
  feature is compiled in; the surrogate fallback matches on the Codec.
- Tokenizer caching is keyed on the same catalog Context the dispatch runs
  on; rust_tokenizer reads the encoding name without loading an encoding;
  LITELLM_RUST parsing is cached.
- Drop the unused tiktoken_encoding_for_model export and Error::Download.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* fix(tokenizer): close the exhaustive matches with assert_never

CodeQL reads a `match` over a Literal with no default arm as an implicit
`None` return. `assert_never` makes the exhaustiveness explicit for both the
HuggingFace tokenizer loader and the Rust token-counter factory.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* feat(tokenizer): derive the fast counter from the shared tokenizer

The count-only counter (`fast` feature) and the codec each parsed the same
artifact: TokenCounter took the Anthropic JSON and the tiktoken rank files
from Python while Tokenizer loaded them again. One parse now serves both.

- FastTokenizer builds from a model another loader holds: `from_shared`
  takes the Arc<tokenizers::Tokenizer> the HF codec keeps, and
  `from_*_pairs` take the ranks the tiktoken vocabulary already parsed.
- `FastCounter::fast_counter` in the core crate derives it from either codec;
  encodings the fast scanner does not reproduce are refused.
- Native `Tokenizer.count(text, fast=False)` opts into that counter, built
  once per tokenizer on first use; `TokenCounter.from_tokenizer(tokenizer,
  fast=False)` replaces the JSON and rank-file constructors.
- The Python route counts over the native tokenizers the codec path shares
  (`native_encoding`, `native_anthropic`) and no longer reads rank files;
  the packaged Anthropic tokenizer has one loader, `tokenizer_dispatch.anthropic`.
- Public wrappers gain `count(text, fast=False)`.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Yujong Lee <yujong@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-22 04:41:11 +00:00
..
_test-unit-base.yml ci(tests): wire tests/unit into CircleCI and drain legacy unit shards green 2026-09-20 07:05:42 +00:00
auto-close-duplicates.yml fix(ci): stop the auto-close duplicates job colliding with the required test check 2026-09-05 22:26:38 -07:00
auto_update_price_and_context_window.yml chore(ci): close the test-census blind spots and move scripts out of workflows/ (#37586) 2026-08-20 10:07:14 -07:00
check-schema-sync.yml ci: give the remaining pull_request workflows a concurrency group 2026-08-08 03:25:38 +00:00
check-ui-api-types.yml fix(proxy): regenerate lazy OpenAPI snapshot and guard it in CI 2026-08-26 14:32:04 -07:00
ci-coverage.yml feat(ci): assert .github/workflows holds only workflows, correctly named (#37616) 2026-08-20 21:36:26 +00:00
codeql.yml ci(zizmor): gate PRs on medium+ findings and clear existing ones (#30797) 2026-06-18 18:26:03 -07:00
codspeed.yml feat(tokenizer): preserve Python defaults with opt-in Rust dispatch (#42174) 2026-09-22 04:41:11 +00:00
conventional-commits.yml ci: give the remaining pull_request workflows a concurrency group 2026-08-08 03:25:38 +00:00
cost-map-guard.yml feat(ci): add the cost map guard check 2026-09-04 17:18:17 -07:00
create-release-branch.yml ci(release): create stable/X.Y.x line branch on X.Y.0 tags (#29457) 2026-06-01 15:56:34 -07:00
create-release.yml revert: drop the create-release.yml gating and E2E_REDIS_CHAOS opt-in 2026-09-11 15:16:00 -07:00
create_daily_staging_branch.yml fix(ci): make every remaining CI checkout shallow (#35997) 2026-08-05 14:32:17 -07:00
duplicate_issue_check.yml ci(duplicate-check): describe the workspace-write sandbox accurately 2026-09-18 14:21:22 -07:00
e2e_record_replay.yml ci(e2e): record the e2e suite weekly and replay it on weekdays with zero egress (#38163) 2026-08-24 23:49:03 -04:00
guard-fork-dependencies.yml ci: give the remaining pull_request workflows a concurrency group 2026-08-08 03:25:38 +00:00
helm_unit_test.yml ci: give the remaining pull_request workflows a concurrency group 2026-08-08 03:25:38 +00:00
image-scan.yml ci(image-scan): ignore zlib CVE-2026-85091 until Wolfi ships the fix 2026-09-15 19:23:21 -07:00
issue-keyword-labeler.yml chore: fixes 2026-04-05 01:30:57 -07:00
issue_classifier.yml ci(issue-classifier): name every workflow, script and job after the issue it works on 2026-09-18 11:37:55 -07:00
issue_fixed_comment.yml ci(issues): comment which release carries the fix when a pull request closes an issue 2026-09-18 17:37:02 -07:00
issue_label_claude_code.yml ci(issue-classifier): name every workflow, script and job after the issue it works on 2026-09-18 11:37:55 -07:00
issue_label_sync.yml ci(issue-classifier): name every workflow, script and job after the issue it works on 2026-09-18 11:37:55 -07:00
mutation-test.yml fix(ci): name the file mutmut actually writes partial results to 2026-08-25 23:54:48 -07:00
osv-scan.yml ci(osv-scan): scan the VS Code extension lockfile 2026-09-18 13:15:17 -07:00
publish-basedpyright-base-counts.yml ci: prepare workflows for main default branch 2026-09-07 12:50:17 -07:00
scorecard.yml chore: fixes 2026-04-05 01:30:57 -07:00
stale.yml chore: fixes 2026-04-05 01:30:57 -07:00
sync-schema.yml chore: fixes 2026-04-05 01:30:57 -07:00
sync-together-ai-models.yml ci: prepare workflows for main default branch 2026-09-07 12:50:17 -07:00
test-code-quality.yml ci: exercise the lite CLI on the Python 3.10 import smoke job 2026-09-14 07:07:06 +00:00
test-e2e-changed.yml Merge pull request #42143 from BerriAI/litellm_e2e_changed_keep_pytest_log 2026-09-21 11:39:25 -07:00
test-e2e-redis-chaos.yml test(e2e): restore the E2E_REDIS_CHAOS opt-in for the redis chaos test 2026-09-11 22:46:31 +00:00
test-linting.yml refactor(mcp): extract explicit operation context and dispatch 2026-09-21 12:24:15 -07:00
test-litellm-ui-build.yml ci(ui): run the UI build check through the image's ui-builder stage 2026-09-02 22:09:55 -07:00
test-litellm-ui-lint.yml ci: give the remaining pull_request workflows a concurrency group 2026-08-08 03:25:38 +00:00
test-litellm-ui-unit.yml fix(ui): retain compatible build and test commands 2026-09-08 15:54:13 -07:00
test-mcp-dependency-resolution.yml fix(mcp): preserve session expiry signals and scope dependency CI 2026-09-18 22:52:10 -07:00
test-mcp-oauth-e2e.yml test(e2e): complete OAuth triggers and preserve failure diagnostics 2026-09-19 17:03:38 -07:00
test-postgres.yml ci: port the Postgres suites off CircleCI onto service containers (#37785) 2026-08-22 22:45:30 -07:00
test-redis-compat.yml fix(redis): coerce env var string types and fix param discovery through decorator wrappers (#30644) 2026-08-31 20:51:31 -07:00
test-rust.yml merge(main): integrate upstream Azure secret changes 2026-09-21 22:10:22 +00:00
test-semgrep.yml fix(ci): retry setup-uv installs to survive transient manifest fetch failures 2026-07-14 14:41:36 -07:00
test-terraform-modules.yml feat(proxy): offload spend tracking to a pod-local collector sidecar (#40545) 2026-09-10 17:14:13 -07:00
test-terraform-provider.yml feat(terraform): coverage-enforcing CI gate against the latest OpenAPI spec (#38710) 2026-08-28 17:11:43 -07:00
test-unit-documentation.yml perf(ci): cache the Rust build the unit shards compile from scratch (#37795) 2026-08-21 20:15:08 -07:00
test-unit-proxy-db.yml Merge pull request #41660 from BerriAI/litellm_remove_commented_out_proxy_tests 2026-09-17 17:56:02 -07:00
test-unit.yml test(mcp): run public client regressions in the MCP shard 2026-09-20 08:39:51 -07:00
test-vscode-extension.yml feat(vscode): add LiteLLM language model provider extension 2026-09-18 12:29:55 -07:00
weekly_load_anomaly.yml ci: run the Redis timeout e2e test from its own weekly workflow 2026-09-09 15:51:11 -07:00
zizmor.yml ci: run zizmor and proxy-db unit tests on PRs targeting litellm_ branches 2026-07-16 11:44:35 -07:00