Repository navigation
fix(examples): make the framework examples run end to end - #405
Merged
Merged
Conversation
Running every example against a local StackOne MCP stand-in, with real
OpenAI and Claude models, showed four examples that fail or print the
wrong thing on main:
- openai-responses-integration: OpenAI rejects the strict schema (400
"additionalProperties is required" for nested query objects), so the
example and README now pass { strict: false }, as the toOpenAIResponses
doc already advises for StackOne actions.
- ai-sdk-integration: AI SDK 5+ tool calls carry `input`, not `args`, so
the example printed "Arguments: undefined".
- anthropic-integration: claude-haiku-4-5-20241022 is not a model id;
the Claude Haiku 4.5 id is claude-haiku-4-5-20251001.
- claude-agent-sdk-integration: a headless query cannot answer a
permission prompt, so the StackOne MCP tools are now listed in
allowedTools and actually run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Guillaume Lebedel <10488548+glebedel@users.noreply.github.com>
…st actions allowedTools runs every tool on the StackOne server without a prompt, so the example and README now fetch only the list actions the prompt needs rather than every action, writes included. The README Anthropic snippet also gets the Claude Haiku 4.5 id the example already uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Guillaume Lebedel <10488548+glebedel@users.noreply.github.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
commit: |
… to non-strict #408 made toOpenAIResponses non-strict by default, so passing it and explaining that strict mode rejects optional fields is redundant. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Guillaume Lebedel <10488548+glebedel@users.noreply.github.com>
Contributor
Author
|
s2d2 fix pass (requested by guillaume@stackone.com in Slack): merged main (4 commits behind, clean). Since #408 made toOpenAIResponses non-strict by default, removed the now redundant { strict: false } and its comment from the README and the OpenAI responses example. Examples typecheck passes locally. Repo skills: none in clone (rules read: git-workflow, development-workflow, typescript-patterns). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
All seven examples were run against a local StackOne MCP stand-in with real OpenAI and Claude models. Four failed or printed the wrong thing on
mainat 9f948a8, and this PR fixes the examples and the README snippets that copy them. Since then #408 madetoOpenAIResponses()non-strict by default, so on currentmainthe OpenAI Responses example no longer fails and the explicit{ strict: false }here is redundant. No library code changes here. The Claude Agent SDK tools also need the SDK fix in #406 to receive their arguments.mainopenai-responses-integration.ts400 Invalid schema for function 'bamboohr_list_employees': In context=('properties', 'query'), 'additionalProperties' is required to be supplied and to be false.toOpenAIResponses({ strict: false }), as the method's doc already advises for StackOne actions. Also in the READMEai-sdk-integration.tsArguments: undefinedinput, notargsanthropic-integration.tsclaude-haiku-4-5-20241022, which is not a model id (20241022is the Claude 3.5 Haiku date)claude-haiku-4-5-20251001, the Claude Haiku 4.5 id in Anthropic's docs and the installed@anthropic-ai/sdkModeltype. Also in the READMEclaude-agent-sdk-integration.tstools/callis made: a headless query cannot answer a permission promptallowedTools: ['mcp__stackone-tools']. Because that runs every tool on the server without asking, the example and README now fetch only*_list_*actionsDogfood: every example,
mainvs this branchThe stand-in is a local HTTP server built from
mocks/mcp-server.tsthat serves BambooHR and Workday tools with five fake workers and logs every request. OpenAI calls go to the real API (gpt-5.1). Claude calls go to real Claude through an Anthropic-compatible endpoint.maintools/calltools/callTool calls found: 2Arguments: undefinedArguments: {"query":{"limit":5}}tool_usewith{"query":{"limit":5}}tools/calltools/call bamboohr_list_employees {"query":{"limit":5}} -> 200, lists the five workersClaude Agent SDK, this branch with #406:
The four open audit PRs (#401 to #404) were also run together on one local branch with all seven examples. Each example made the same request sequence as on
main, and auth-management and search-and-execute printed identical output, so none of those PRs changes example behaviour.Test plan
pnpm vitest run tests/examples: 10 passed, no type errorsoxfmt --check README.md examples: passGates
.claude/rules/*.release-pleasenot applied: no release in scope/forge:forgeallowedToolsand the*_list_*filter are there*_list_*actions, with a comment in the README. Aikido: none of the open critical/high issues is in a changed file/security-reviewallowedToolscovers only the StackOne server, built-in tools stay off withtools: []; no secrets in snippets)/code-reviewmainvs this branchmcp__stackone-toolscovers every tool on the server)Post-merge validation
Docs and examples only, nothing to deploy. After the next release, run the OpenAI Responses and Claude Agent SDK examples against a real account. The signal that it works is tool calls with arguments and exit 0. The regression signal is a 400 schema error or a permission request.
Requested by guillaume@stackone.com in Slack (repo audit thread).
🤖 Generated with Claude Code