Skip to content

Add a TypeSafe mock that returns the published example answers - #818

Draft
mnvsk97 wants to merge 1 commit into
mainfrom
cursor/typesafe-mock-server-ca38
Draft

mnvsk97 wants to merge 1 commit into
mainfrom
cursor/typesafe-mock-server-ca38

Conversation

@mnvsk97

@mnvsk97 mnvsk97 commented Sep 19, 2026

Copy link
Copy Markdown

Summary

Adds a local TypeSafe HTTP mock under tools/typesafe-mock. It serves the two documented endpoints and always returns the published example numbers. It does not call a model.

Changes

  • POST /v1/systemone accepts noul, choice, and score questions and returns model, answers, and usage.
  • GET /v1/models lists jev-latest and jev-preview.
  • Every question reuses the API reference example (noul 0.92, choice 0.08/0.85/0.07, score 1.6). The three documented requests return that JSON exactly.
  • Missing auth matches the live 403 body. A wrong key returns 401 only when TYPESAFE_API_KEY is set.

How was this tested?

Curled POST /v1/systemone for the documented urgency example and for a different mixed request. Both returned the fixed example numbers. GET /v1/models returned the alias list.

Checklist

  • I have read the contributing guidelines
  • pnpm build, pnpm test, pnpm typecheck, pnpm lint:ci, and pnpm format:check pass locally
  • Tests added/updated where it makes sense
  • No hand-edits to generated code
  • Docs / .env.example updated if configuration or behavior changed
Open in Web Open in Cursor 

POST /v1/systemone and GET /v1/models follow the documented wire shape. Every question reuses the same example numbers instead of inventing a result from the request.

Co-authored-by: M N V Sai Krishna <mnvsk97@gmail.com>
@changeset-bot

changeset-bot Bot commented Sep 19, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: a78f23d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants