Kieran's opinionated (and probably slightly dumb) nix config

chore: update token limit on claude models

dunkirk.sh c55499b7 123a0889

verified
Changed files
+23 -15
dots
modules
home
apps
+19 -11
dots/update-crush-models.sh
···
# Generate Copilot models Nix config
generate_copilot_models() {
-
echo "$COPILOT_MODELS" | jq -r '.data[] | select(.model_picker_enabled == true) |
+
echo "$COPILOT_MODELS" | jq -r '.data[] | select(.model_picker_enabled == true) |
(if .capabilities.supports.tool_calls then true else false end) as $can_reason |
(if .capabilities.supports.vision then true else false end) as $supports_attachments |
" {\n" +
···
else
{in: 3.0, out: 15.0, in_cached: 0.225, out_cached: 15.0}
end) as $pricing |
-
+
# Determine context window and max tokens
-
(if (.id | contains("opus-4")) or (.id | contains("sonnet-4")) or (.id | contains("3-7-sonnet")) then
-
{context: 200000, max_tokens: (if (.id | contains("sonnet-4-5")) then 50000 else 50000 end)}
-
elif (.id | contains("3-5")) then
-
{context: 200000, max_tokens: 8192}
-
elif (.id | contains("3-haiku")) or (.id | contains("3-opus")) then
-
{context: 200000, max_tokens: 4096}
+
(if (.id | test("claude-sonnet-4-5"))
+
then {context: 200000, max_tokens: 64000}
+
elif (.id | test("claude-sonnet-4-"))
+
then {context: 200000, max_tokens: 64000}
+
elif (.id | test("claude-3-7-sonnet"))
+
then {context: 200000, max_tokens: 64000}
+
elif (.id | test("claude-opus-4-1"))
+
then {context: 200000, max_tokens: 32000}
+
elif (.id | test("claude-opus-4-"))
+
then {context: 200000, max_tokens: 32000}
+
elif (.id | test("claude-3-5-haiku"))
+
then {context: 200000, max_tokens: 8192}
+
elif (.id | test("claude-3-haiku"))
+
then {context: 200000, max_tokens: 4096}
else
{context: 200000, max_tokens: 8192}
end) as $limits |
-
+
# Determine has_reasoning_efforts
(if (.id | contains("opus-4")) then true else false end) as $has_reasoning |
-
+
" {\n" +
" id = \"\(.id)\";\n" +
" name = \"\(.display_name)\";\n" +
···
echo -e "\n${BLUE}═══════════════════════════════════════════════════════════${NC}"
echo -e "\n${GREEN}Summary:${NC}"
echo " • Copilot models: $(echo "$COPILOT_MODELS" | jq '[.data[] | select(.model_picker_enabled == true)] | length')"
-
echo " • Anthropic models: $(echo "$ANTHROPIC_MODELS" | jq '.data | length')"
+
echo " • Anthropic models: $(echo "$ANTHROPIC_MODELS" | jq '.data | length')"
+4 -4
modules/home/apps/crush.nix
···
cost_per_1m_in_cached = 0.225;
cost_per_1m_out_cached = 15.0;
context_window = 200000;
-
default_max_tokens = 50000;
+
default_max_tokens = 64000;
can_reason = true;
has_reasoning_efforts = false;
supports_attachments = true;
···
cost_per_1m_in_cached = 0.225;
cost_per_1m_out_cached = 15.0;
context_window = 200000;
-
default_max_tokens = 50000;
+
default_max_tokens = 64000;
can_reason = true;
has_reasoning_efforts = false;
supports_attachments = true;
···
cost_per_1m_in_cached = 0.187;
cost_per_1m_out_cached = 12.0;
context_window = 200000;
-
default_max_tokens = 50000;
+
default_max_tokens = 64000;
can_reason = true;
has_reasoning_efforts = false;
supports_attachments = true;
···
cost_per_1m_in_cached = 1.5;
cost_per_1m_out_cached = 75.0;
context_window = 200000;
-
default_max_tokens = 4096;
+
default_max_tokens = 8192;
can_reason = true;
has_reasoning_efforts = false;
supports_attachments = true;