# Test Reasoning

Validate that reasoning parameters are correctly serialized and sent to provider APIs.

- Repository: https://github.com/tailcallhq/forgecode (7636 stars)
- Category: Testing
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add tailcallhq/forgecode --skill test-reasoning -g -a claude-code -y`
Codex: `npx skills add tailcallhq/forgecode --skill test-reasoning -g -a codex -y`
Cursor: `npx skills add tailcallhq/forgecode --skill test-reasoning -g -a cursor -y`
Gemini CLI: `npx skills add tailcallhq/forgecode --skill test-reasoning -g -a gemini-cli -y`

## Description

Validate that reasoning parameters are correctly serialized and sent to provider APIs. Use when the user asks to test reasoning serialization, run reasoning tests, verify reasoning config fields, or check that ReasoningConfig maps correctly to provider-specific JSON (OpenRouter, Anthropic, GitHub Copilot, Codex).

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Test Reasoning Serialization

Validates that `ReasoningConfig` fields are correctly serialized into provider-specific JSON
for OpenRouter, Anthropic, GitHub Copilot, and Codex.

## Quick Start

Run all tests with the bundled script:

```bash
./scripts/test-reasoning.sh
```

The script builds forge in debug mode, runs each provider/model combination, captures the
outgoing HTTP request body via `FORGE_DEBUG_REQUESTS`, and asserts the correct JSON fields.

## Running a Single Test Manually

```bash
FORGE_DEBUG_REQUESTS="forge.request.json" \
FORGE_SESSION__PROVIDER_ID=<provider_id> \
FORGE_SESSION__MODEL_ID=<model_id> \
FORGE_REASONING__EFFORT=<effort> \
target/debug/forge -p "Hello!"
```

Then inspect `.forge/forge.request.json` for the expected fields.

## Test Coverage

The rest: https://github.com/tailcallhq/forgecode/blob/HEAD/.forge/skills/test-reasoning/SKILL.md
