Skip to content

Conversation

@torresmateo
Copy link
Collaborator

@torresmateo torresmateo commented Dec 10, 2025

Note

Adds a new guide demonstrating how to integrate Arcade tools into a Python LLM app (via OpenRouter) and updates navigation to include it.

  • Docs
    • Add new guide page app/en/home/connect-arcade-to-your-llm/page.mdx.
      • Covers project setup with uv, environment configuration, and dependencies (arcadepy, openai, python-dotenv).
      • Provides Python example implementing:
        • Tool selection and retrieval from Arcade (arcade.tools.formatted.get).
        • Authorization + execution helper (arcade.tools.authorize, arcade.tools.execute).
        • Multi-turn ReAct-style loop with OpenRouter (OpenAI.chat.completions.create) and tool call handling.
        • Interactive CLI chat loop.
      • Includes “Next Steps” and full example code.
  • Navigation
    • Update app/en/home/_meta.tsx to add "connect-arcade-to-your-llm" entry titled "Integrate Arcade tools into your LLM application" under Guides.

Written by Cursor Bugbot for commit c645390. This will update automatically on new commits. Configure here.

@vercel
Copy link

vercel bot commented Dec 10, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docs Ready Ready Preview Comment Dec 10, 2025 9:33pm

"content": tool_result,
})

continue
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Missing assistant message before tool results in history

When the LLM returns tool calls, the code appends tool result messages to history but never appends the assistant message that contained the tool_calls. The OpenAI API (and compatible APIs like OpenRouter) requires the assistant message with tool_calls to appear in the conversation history before the corresponding tool result messages. This will cause an API error on the next iteration of the loop when the malformed history is sent back to the model.

Additional Locations (1)

Fix in Cursor Fix in Web

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