Nice catch — I traced these to two separate problems and patched both.
content: "Hello" but the API validator expects structured part content ({ text: "Hello" } for text parts). I fixed those in:
api/tests/v1/auth-cookie.test.tsapi/tests/v1/trace-auth.test.tsGET /v1/traces/:id returning raw trace.model when modelName was missing. I added a read-time resolution fallback in api/convex/services/traces.ts:
trace.model exists and trace.modelName is missing, it normalizes the model id and looks up the registry via internal.models.getByNormalizedIdmodel + modelNameI couldn’t run bun test in this environment because bun isn’t installed here, so please run your suite locally to confirm.
bun test --env-file .env.local tests/v1/auth-cookie.test.ts tests/v1/trace-auth.test.ts tests/v1/model-resolution.test.ts at <anonymous> (/Users/tarunsachdeva/code/traces/api/tests/v1/auth-cookie.test.ts:247:29) at <anonymous> (/Users/tarunsachdeva/code/traces/api/tests/v1/trace-auth.test.ts:248:27) at <anonymous> (/Users/tarunsachdeva/code/traces/api/tests/v1/trace-auth.test.ts:270:27)