Skip to content

Commit bbe1e4b

Browse files
committed
build(nix): lock LiteLLM pricing through repository input
Switch the LiteLLM pricing source from a raw GitHub file input to the full BerriAI/litellm repository input. The build still reads model_prices_and_context_window.json, but the lock file now records the upstream commit metadata instead of only a file hash. Update the scheduled pricing workflow and README instructions to target the renamed litellm input. This keeps automated pricing refreshes aligned with the new flake input name.
1 parent 5548d6d commit bbe1e4b

4 files changed

Lines changed: 18 additions & 13 deletions

File tree

‎.github/workflows/update-pricing.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- uses: ./.github/actions/setup-nix
1818
- name: Update LiteLLM pricing input
1919
run: |
20-
nix flake update litellm-pricing
20+
nix flake update litellm
2121
nix run .#update-pricing-fallback
2222
nix flake check
2323
- name: Create pull request

‎apps/ccusage/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,10 @@ nix run github:ryoppippi/ccusage -- codex daily --offline
188188
nix build github:ryoppippi/ccusage
189189
```
190190

191-
Nix builds embed the LiteLLM pricing file from the locked `litellm-pricing` flake input, so sandboxed builds do not fetch pricing at build time. To update the locked pricing snapshot and refresh the non-Nix Cargo fallback JSON:
191+
Nix builds embed the LiteLLM pricing file from the locked `litellm` flake input, so sandboxed builds do not fetch pricing at build time. To update the locked pricing snapshot and refresh the non-Nix Cargo fallback JSON:
192192

193193
```bash
194-
nix flake update litellm-pricing
194+
nix flake update litellm
195195
nix run .#update-pricing-fallback
196196
nix flake check
197197
```

‎flake.lock‎

Lines changed: 11 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎flake.nix‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@
33

44
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
55
inputs.crane.url = "github:ipetkov/crane";
6-
inputs.litellm-pricing = {
7-
url = "https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json";
6+
inputs.litellm = {
7+
url = "github:BerriAI/litellm";
88
flake = false;
99
};
1010
inputs.rust-overlay = {
1111
url = "github:oxalica/rust-overlay";
1212
inputs.nixpkgs.follows = "nixpkgs";
1313
};
1414

15-
outputs = { self, crane, litellm-pricing, nixpkgs, rust-overlay, ... }:
15+
outputs = { self, crane, litellm, nixpkgs, rust-overlay, ... }:
1616
let
17+
litellm-pricing = "${litellm}/model_prices_and_context_window.json";
1718
systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
1819
forAllSystems = f:
1920
nixpkgs.lib.genAttrs systems (system:

0 commit comments

Comments
 (0)