Skip to content

Commit ebd45b9

Browse files
authored
Merge branch 'main' into codex-structural-replay-boundary
2 parents d31f1e0 + 4985a8a commit ebd45b9

13 files changed

Lines changed: 1977 additions & 1268 deletions

‎.github/APPROVED_CONTRIBUTORS‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ yukukotani pr
2525
zcutlip pr
2626

2727
tackeyy pr
28+
29+
hyfdev pr

‎.github/workflows/pullfrog.yml‎

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# PULLFROG ACTION — DO NOT EDIT EXCEPT WHERE INDICATED
2+
name: Pullfrog
3+
run-name: ${{ inputs.name || github.workflow }}
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
prompt:
8+
type: string
9+
description: Agent prompt
10+
name:
11+
type: string
12+
description: Run name
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
pullfrog:
19+
runs-on: blacksmith-32vcpu-ubuntu-2404
20+
permissions:
21+
id-token: write
22+
contents: read
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
26+
with:
27+
fetch-depth: 1
28+
- name: Setup Nix
29+
uses: ./.github/actions/setup-nix-cache
30+
- name: Run agent
31+
uses: pullfrog/pullfrog@a809795406487e13f894c681ea09b4f96015284d # v0.1.36
32+
with:
33+
prompt: ${{ inputs.prompt }}
34+
env:
35+
# add at least one provider API key
36+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
37+
CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
38+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
39+
GOOGLE_GENERATIVE_AI_API_KEY: ${{ secrets.GOOGLE_GENERATIVE_AI_API_KEY }}
40+
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
41+
XAI_API_KEY: ${{ secrets.XAI_API_KEY }}
42+
DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}
43+
MOONSHOT_API_KEY: ${{ secrets.MOONSHOT_API_KEY }}
44+
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
45+
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
46+
47+
# for Amazon Bedrock (https://docs.pullfrog.com/bedrock)
48+
# AWS_BEARER_TOKEN_BEDROCK: ${{ secrets.AWS_BEARER_TOKEN_BEDROCK }}
49+
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
50+
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
51+
# AWS_REGION: us-east-1
52+
# BEDROCK_MODEL_ID: <bedrock-model-id>
53+
54+
# for Google Vertex AI (https://docs.pullfrog.com/vertex)
55+
# VERTEX_SERVICE_ACCOUNT_JSON: >-
56+
# ${{ secrets.VERTEX_SERVICE_ACCOUNT_JSON }}
57+
# GOOGLE_CLOUD_PROJECT: my-project
58+
# VERTEX_LOCATION: global
59+
# VERTEX_MODEL_ID: <vertex-model-id>

‎.github/workflows/release.yaml‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,22 @@ on:
44
push:
55
branches:
66
- main
7+
# Toggling tagpr:minor / tagpr:major labels on the release PR should update
8+
# its proposed version right away, instead of waiting for the next push to
9+
# main to make tagpr recompute it.
10+
pull_request:
11+
types:
12+
- labeled
13+
- unlabeled
14+
workflow_dispatch:
715

816
concurrency: tagpr
917

1018
jobs:
1119
tagpr:
20+
# Label events only matter on tagpr's own release PR; skip the rest so
21+
# ordinary PR labeling doesn't spend runner time.
22+
if: github.event_name != 'pull_request' || startsWith(github.head_ref, 'tagpr-from-')
1223
runs-on: blacksmith-32vcpu-ubuntu-2404
1324
timeout-minutes: 15
1425
permissions:
@@ -19,8 +30,11 @@ jobs:
1930
tag: ${{ steps.tagpr.outputs.tag }}
2031
steps:
2132
# persist-credentials stays on (default) so tagpr can push the release PR and tag
33+
# ref: main because on pull_request events the default checkout is the
34+
# PR merge ref, while tagpr always operates on the release branch.
2235
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
2336
with:
37+
ref: main
2438
fetch-depth: 0
2539
- id: tagpr
2640
uses: Songmu/tagpr@e84001bd5dac8defa0c75b3913937d284a3b3660 # v1.20.0

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
- name: Skip lock-only models.dev updates
9898
run: |
9999
# Only the compacted snapshot affects the build; if a models.dev bump
100-
# leaves the Anthropic pricing unchanged, drop the lock-only churn.
100+
# leaves embedded pricing unchanged, drop the lock-only churn.
101101
if git diff --quiet -- rust/crates/ccusage/src/models-dev-pricing.json; then
102102
echo "models.dev pricing snapshot is unchanged; skipping PR."
103103
git checkout -- flake.lock rust/crates/ccusage/src/models-dev-pricing.json

‎flake.lock‎

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

‎nix/dev-shell.nix‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ in
4747
renovate
4848
jq
4949
git
50+
git-wt
5051
gh
5152
hyperfine
5253
similarity
@@ -74,6 +75,17 @@ in
7475
fi
7576
${lib.getExe config.packages.syncAgentSkills}
7677
${config.pre-commit.shellHook}
78+
79+
# Set up direnv and JS dependencies whenever `git wt` creates a new
80+
# worktree, so worktrees are usable without a manual step.
81+
git config --replace-all wt.hook "direnv allow || true; pnpm install --frozen-lockfile || true"
82+
83+
# Move deleted worktree directories to the trash instead of `rm -rf`,
84+
# which is noticeably slower on large node_modules and target trees.
85+
git config --replace-all wt.remover "${pkgs.trash-cli}/bin/trash"
86+
87+
# Free the worktree's direnv/nix state before it's deleted.
88+
git config --replace-all wt.deletehook "direnv revoke .envrc || true; ${pkgs.trash-cli}/bin/trash .direnv || true; nix store gc || true"
7789
'';
7890
};
7991
};

‎nix/models-dev-compact.test.ts‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,28 @@ void it('prefers Anthropic provider pricing over duplicate aliases', () => {
5959
);
6060
});
6161

62+
void it('prefers MoonshotAI provider pricing over reseller duplicates', () => {
63+
assert.equal(
64+
shouldReplaceModelsDevPricingCandidate(
65+
{
66+
sourceProviderId: 'venice',
67+
sourceModelId: 'kimi-k3',
68+
hasContextLimit: true,
69+
hasExplicitCacheRead: true,
70+
hasExplicitCacheWrite: false,
71+
},
72+
{
73+
sourceProviderId: 'moonshotai',
74+
sourceModelId: 'kimi-k3',
75+
hasContextLimit: true,
76+
hasExplicitCacheRead: true,
77+
hasExplicitCacheWrite: false,
78+
},
79+
),
80+
true,
81+
);
82+
});
83+
6284
void it('uses a stable source ordering tie-break for duplicate aliases', () => {
6385
assert.equal(
6486
shouldReplaceModelsDevPricingCandidate(

‎nix/models-dev-compact.ts‎

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,23 @@ function compareModelsDevPricingCandidates(
4242
}
4343

4444
function candidateProviderPriority(candidate: ModelsDevPricingCandidate): number {
45-
if (candidate.sourceProviderId === 'anthropic') {
45+
// Prefer first-party provider catalogs when several resellers publish the
46+
// same pricing key (for example moonshotai vs venice for kimi-k3).
47+
if (
48+
candidate.sourceProviderId === 'anthropic' ||
49+
candidate.sourceProviderId === 'moonshotai' ||
50+
candidate.sourceProviderId === 'moonshot'
51+
) {
4652
return 2;
4753
}
48-
return candidate.sourceModelId.includes('anthropic') ? 1 : 0;
54+
if (
55+
candidate.sourceModelId.includes('anthropic') ||
56+
candidate.sourceModelId.includes('moonshot') ||
57+
candidate.sourceModelId.includes('kimi')
58+
) {
59+
return 1;
60+
}
61+
return 0;
4962
}
5063

5164
function compareNumber(left: number, right: number): number {

0 commit comments

Comments
 (0)