Skip to content

Instantly share code, notes, and snippets.

@Cahl-Dee
Cahl-Dee / inference-api-http-400-events-today.csv
Last active August 17, 2026 22:56
Inference API HTTP 400 errors observed on 2026-08-17
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 14 columns, instead of 7 in line 5.
timestamp_utc,model,request_class,http_status,error_type,message,preceding_success_model,preceding_success_input_tokens,preceding_success_total_tokens,preceding_success_latency_s,next_success_model,next_success_input_tokens,next_success_total_tokens,next_success_latency_s
"2026-08-17 16:58:08,069",kimi-latest,main,400,invalid_request_error,Failed to read request body,kimi-latest,129597,129880,25.7,kimi-latest,130815,131058,17.3
"2026-08-17 17:01:50,546",kimi-latest,background,400,invalid_request_error,Failed to read request body,kimi-latest,139765,139897,13.8,kimi-latest,135047,136750,25.0
"2026-08-17 17:07:00,297",kimi-latest,main,400,invalid_request_error,Failed to read request body,kimi-latest,138305,138477,18.5,kimi-latest,138557,139352,37.0
"2026-08-17 17:08:34,591",kimi-latest,main,400,invalid_request_error,Failed to read request body,kimi-latest,138557,139352,37.0,gpt-sol-latest,135032,135271,9.8
"2026-08-17 17:19:32,757",gpt-sol-latest,main,400,invalid_request_error,Failed to read request body,gpt-sol
@Cahl-Dee
Cahl-Dee / thegrid-transport-events.csv
Last active August 17, 2026 22:23
Client-observed Trading API transport disconnects after retry mitigation
We can make this file beautiful and searchable if this error is corrected: It looks like row 4 should actually have 16 columns, instead of 14 in line 3.
timestamp_utc,method,path,operation_id,failed_request_id,retry_request_id,server_request_id,signed_timestamp_attempt_1,signed_timestamp_attempt_2,idle_gap_ms,attempt_1_elapsed_ms,attempt_2_elapsed_ms,total_elapsed_ms,error_type,will_retry,retry_status
"2026-08-15 21:56:32,041",GET,/v1/currency-trading-accounts,e2e7a9ddc8574b73b9ca940c44f38502,2c4dcbacccef4f0c80082e171b3352b9,8391c269f58e48b796b7f38a16f80085,8391c269f58e48b796b7f38a16f80085,1786848987,1786848992,50946,4096,1628,5739,ConnectionError,True,200
"2026-08-15 22:16:17,084",GET,/v1/markets/market-4dccbf0b-3ff7-460a-be3b-c45b1ad1f4b7/trades,1bc9880beae24a20b763bd0f2265a34e,aa59004408394210b685cf5b46361067,3c92f699561f42b68bbc00cb8d1c2f9a,3c92f699561f42b68bbc00cb8d1c2f9a,1786849229,1786850177,0,1039,905,1945,ConnectionError,True,200
"2026-08-15 22:39:57,055",GET,/v1/price-histories,ff4529827e3a419da5b6be3b00dffb3c,26b3a7bf5d164f918e2148e53291f7af,1dab235c1e02477aa9c712f531f2f90d,1dab235c1e02477aa9c712f531f2f90d,1786850586,1786851597,0,995,674,1670,Co
@Cahl-Dee
Cahl-Dee / gist:6eda30a849642b63ce6d01fa7d8db220
Created August 17, 2026 13:27
thegrid-stretch transport behavior post-fix (2026-08-17)
# thegrid-stretch transport behavior — post-fix report
**Date:** 2026-08-17 13:25 UTC
**Daemon:** `com.carl.thegrid-stretch` (PID 50778) — **ALIVE BUT HUNG**
**Log file:** `logs/bot.err.log` (last write 2026-08-17 08:25 UTC, ~5h ago)
---
## TL;DR
@Cahl-Dee
Cahl-Dee / thegrid-client-transport-mitigation-summary-2026-08-15.md
Created August 15, 2026 20:58
The Grid client transport mitigation and observability changes — 2026-08-15

Client transport mitigation and observability changes — 2026-08-15

This is a codebase-independent summary for the server/infra team. All times and identifiers below are safe to use for correlation; no credentials, signatures, fingerprints, or trading payloads are included.

Why we changed the client

Server-side investigation found:

  • The reported disconnects generally did not align with pod shutdowns.
  • The ALB showed no 5xx, 460/463, or target failures near the incidents.
@Cahl-Dee
Cahl-Dee / thegrid-api-transport-incidents-2026-08-15.md
Created August 15, 2026 20:15
The Grid API transport incidents — 2026-08-15 (UTC)

The Grid API transport incidents — 2026-08-15

Server-side debugging packet for trading.api.thegrid.ai.

All incident times below are UTC. The source daemon log uses CDT (UTC−5), so UTC = logged time + 5 hours.

Client context

  • Host OS: macOS 26.3.1, arm64
  • Python: 3.11.15
/**
* Grid Trading API - Consumption Balance Maintainer
*
* This script monitors your consumption balance and automatically purchases units
* when the balance drops below the minimum threshold (default: 1 unit).
*
* Prerequisites:
* - Node.js 18+ with ES modules support
* - Environment variables configured in .env file
*
This file has been truncated, but you can view the full file.
0 info it worked if it ends with ok
1 verbose cli [ '/root/.nvm/versions/node/v4.2.6/bin/node',
1 verbose cli '/root/.nvm/versions/node/v4.2.6/bin/npm',
1 verbose cli 'install',
1 verbose cli 'sqlite3',
1 verbose cli '--loglevel=info' ]
2 info using npm@4.1.1
3 info using node@v4.2.6
4 silly loadCurrentTree Starting