AGENT SKILL

test-reasoning

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

使用场景测试与质量
License 许可
Apache-2.0
最近更新
2026-06-12
Stars
★ 28
Forks
3

01 前言 Front Matter

name
test-reasoning
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).

02 资源文件 1

03 SKILL.md 正文

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

Provider Model Config fields Expected JSON field
open_router openai/o4-mini effort: none|minimal|low|medium|high|xhigh reasoning.effort
open_router openai/o4-mini max_tokens: 4000 reasoning.max_tokens
open_router openai/o4-mini effort: high + exclude: true reasoning.effort + .exclude
open_router openai/o4-mini enabled: true reasoning.enabled
open_router anthropic/claude-opus-4-5 max_tokens: 4000 reasoning.max_tokens
open_router moonshotai/kimi-k2 max_tokens: 4000 reasoning.max_tokens
open_router moonshotai/kimi-k2 effort: high reasoning.effort
open_router minimax/minimax-m2 max_tokens: 4000 reasoning.max_tokens
open_router minimax/minimax-m2 effort: high reasoning.effort
anthropic claude-opus-4-6 effort: low|medium|high|max output_config.effort
anthropic claude-3-7-sonnet-20250219 enabled: true + max_tokens: 8000 thinking.type + budget_tokens
github_copilot o4-mini effort: none|minimal|low|medium|high|xhigh reasoning_effort (top-level)
codex gpt-5.1-codex effort: none|minimal|low|medium|high|xhigh reasoning.effort + .summary
codex gpt-5.1-codex effort: medium + exclude: true reasoning.summary = "concise"
all providers one model each effort: invalid non-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

04 同仓库更多 Skills

justrach
justrach/codegraff2

github-pr-description

Generate and create pull request descriptions automatically using GitHub CLI. Use when the user asks to create a PR, generate a PR description, make a pull request, or submit changes for review. Analyzes git diff and commit history to create comprehensive, meaningful PR descriptions that explain what changed, why it matters, and how to test it.

★ 28
justrach
justrach/codegraff2

execute-plan

Execute structured task plans with status tracking. Use when the user provides a plan file path in the format `plans/{current-date}-{task-name}-{version}.md` or explicitly asks you to execute a plan file.

★ 28
justrach
justrach/codegraff2

create-skill

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends your capabilities with specialized knowledge, workflows, or tool integrations.

Skill与智能体开发
★ 28
justrach
justrach/codegraff2

test-skill

A test skill with resources

测试与质量Skill与智能体开发
★ 28
justrach
justrach/codegraff2

minimal-skill

A minimal skill with no resources

Skill与智能体开发
★ 28
justrach
justrach/codegraff2

write-release-notes

Generate engaging, high-energy release notes for a given version tag. Fetches the release from GitHub, retrieves every linked PR's title and description, then synthesizes all changes into a polished, user-facing release note with an enthusiastic tone. Use when the user asks to write, generate, or create release notes for a version (e.g. "write release notes for v1.32.0", "generate release notes for the latest release", "create changelog for v2.0").

★ 28