New to Claude Skills? Learn how to install them →

Ttailcallhq on GitHub

Test Reasoning Serialization

Free

Validate reasoning parameters for provider APIs.

Get this skill

Free · Opens the source repo

What Test Reasoning Serialization does

The Test Reasoning Serialization skill is designed for developers working with AI models that require precise configuration of reasoning parameters. This skill validates that the ReasoningConfig fields are serialized correctly into provider-specific JSON formats for various AI services, including OpenRouter, Anthropic, GitHub Copilot, and Codex. By ensuring that the reasoning parameters are accurately represented, developers can avoid potential issues when making API calls to these services.

To use this skill, you can run the provided script, test-reasoning.sh, which executes a series of tests across different provider and model combinations. The script captures the outgoing HTTP request body, allowing you to verify that the expected JSON fields are present and correctly formatted. This is particularly useful when integrating with multiple AI providers, as each may have unique requirements for how reasoning parameters should be structured.

The skill also supports manual testing for specific configurations, enabling developers to debug and inspect the serialized output for any given provider and model. This flexibility allows for targeted validation of reasoning configurations, ensuring that developers can quickly identify and rectify any discrepancies in their setup.

Overall, this skill is essential for developers who need to ensure that their AI integrations are robust and correctly configured, particularly in environments where accuracy in reasoning parameters is critical for optimal performance.

When to use it

Use this skill when you need to validate reasoning configurations before making API calls to AI providers.

When not to use it

This skill is not suitable for scenarios where reasoning parameters are not required or when working with providers outside the supported list.

What you can build with it

Validating API Calls

Ensure that your reasoning parameters are serialized correctly before making API requests to avoid errors.

Debugging Configuration Issues

Use the skill to manually test and inspect the serialized output for specific provider and model combinations.

Integrating Multiple AI Providers

Streamline the validation process for reasoning configurations across different AI services.

How to install Test Reasoning Serialization

View source

1. Install with the skills CLI

npx skills add tailcallhq/forgecode/test-reasoning --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by tailcallhq

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:

./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

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

ProviderModelConfig fieldsExpected JSON field
open_routeropenai/o4-minieffort: none|minimal|low|medium|high|xhighreasoning.effort
open_routeropenai/o4-minimax_tokens: 4000reasoning.max_tokens
open_routeropenai/o4-minieffort: high + exclude: truereasoning.effort + .exclude
open_routeropenai/o4-minienabled: truereasoning.enabled
open_routeranthropic/claude-opus-4-5max_tokens: 4000reasoning.max_tokens
open_routermoonshotai/kimi-k2max_tokens: 4000reasoning.max_tokens
open_routermoonshotai/kimi-k2effort: highreasoning.effort
open_routerminimax/minimax-m2max_tokens: 4000reasoning.max_tokens
open_routerminimax/minimax-m2effort: highreasoning.effort
anthropicclaude-opus-4-6effort: low|medium|high|maxoutput_config.effort
anthropicclaude-3-7-sonnet-20250219enabled: true + max_tokens: 8000thinking.type + budget_tokens
github_copiloto4-minieffort: none|minimal|low|medium|high|xhighreasoning_effort (top-level)
codexgpt-5.1-codexeffort: none|minimal|low|medium|high|xhighreasoning.effort + .summary
codexgpt-5.1-codexeffort: medium + exclude: truereasoning.summary = "concise"
all providersone model eacheffort: invalidnon-zero exit, no request written

Tests for unconfigured providers are skipped automatically. Invalid-effort tests run regardless of credentials — the rejection happens at config parse time before any provider interaction.

References

Frequently asked questions about Test Reasoning Serialization

Similar skills