Skip to content

Conversation

@bestian
Copy link

@bestian bestian commented Aug 23, 2025

Description:

This PR introduces an initial implementation that allows SenseMaking-tool to connect with OpenRouter for multi-model support.

Key Updates

  • Added scaffolding for OpenRouter integration, enabling users to choose between multiple models.

  • Verified that GPT-OSS-120B (open-weights model) can successfully run the core Sensemaker pipeline.

  • Implemented multi-language support, currently covering:

    • English
    • Chinese(Traditional)
    • Chinese(Simplified)
    • French
    • Spanish
    • Japanese
  • Maintained scaffolding code intentionally, so that contributors and reviewers can more easily test, review, and iterate on this integration.

Notes

  • This is an early-stage implementation. The goal is to establish a working baseline for OpenRouter integration and multi-language support.
  • Some issues may still exist, especially around multilingual input/output handling.
  • Additional cleanup, refactoring, and configuration options will follow once the approach has been reviewed and validated.

Next Steps

  • Gather feedback from maintainers on:

    • Whether the current integration aligns with project direction.
    • The design of the multilingual system and possible improvements.

Testing

To use open router model, you have to set up envivronment varibles (.env) as bellow:

# OpenRouter API Configuration
OPENROUTER_API_KEY=your_openrouter_api_key_here
OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
OPENROUTER_MODEL=openai/gpt-oss-120b

# Optional: Custom headers for OpenRouter
OPENROUTER_X_TITLE=Sensemaking Tools

then run following command (with "./files/comments.csv" prepared)

npx ts-node ./library/runner-cli/runner_openrouter.ts \
  --outputBasename out \
  --inputFile "./files/comments.csv" \
  --additionalContext "請摘要描述此公共討論" \
  --output_lang zh-TW

bestian added 30 commits August 10, 2025 10:29
json_schema: {
                  name: "response",
                  strict: true, // 若改為 false 會允許更寬鬆的格式
                  schema: schema
                }
@bestian bestian changed the title Add OpenRouter multi-model support (initial scaffolding with GPT-OSS-120B) Add OpenRouter multi-model and multi-language support (initial scaffolding with GPT-OSS-120B) Aug 25, 2025
@patcon
Copy link

patcon commented Sep 5, 2025

I'm also interested in this direction, @bestian, and am excited for the vTaiwan process using sensemaking-tools! I wonder if it could be chunked into smaller pieces for easier review and discussion of integration potential? It seems perhaps there's:

  1. an improved documentation proposal in English,
  2. a multilingual documentation proposal beyond English,
  3. a multilingual prompt/content feature (including feature-specific docs), and
  4. the multi-model openrouter support (including feature-specific docs)

If the maintainer found it easier to weigh in the components of this, I'd be happy to help submit smaller, more atomic pull requests in the interest of seeing these arrive upstream 🙏

@bestian
Copy link
Author

bestian commented Sep 6, 2025

@patcon I think your approach will be much better for maintenance. It’s beyond my experience and skill, but if you can divide this PR into chunks or components, I would be very grateful for your contribution.

@bestian
Copy link
Author

bestian commented Sep 6, 2025

@patcon

I sent an invitation to you for colleboration, please check it:

https://github.com/bestian/sensemaking-tools

perhaps you can create new branches in this repo for chunking this PR into smaller pieces for easier review? Thank you a lot.

@patcon
Copy link

patcon commented Sep 7, 2025

thanks! Going to wait to hear back from one of the maintainers, as I don't want to presume these are directions they would like to take things in 🙏

@@ -0,0 +1,253 @@
# **Sensemaker by Jigsaw \- A Google AI Proof of Concept**
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this file just a copy of the original README?

Copy link
Collaborator

@metasoarous metasoarous left a comment

Choose a reason for hiding this comment

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

Thanks for your submission @bestian!

Overall, this is a helpful addition to the project. A few changes would be helpful before we merge this:

  • Documentation & Artifacts: There are a lot of new markdown files (e.g. design/branch_todo.md, design/工程設計.md, and various INTEGRATION_SUMMARY.md and IMPLEMENTATION_GUIDE.md files), some of which seem to be AI planning artifacts. Can you please:
    • Remove any planning documents (or scaffolding code) which aren't necessary to understand or run the codebase.
    • For any technical documentation you think is important to keep (like architecture designs), please translate them into English so they are accessible to all maintainers. If it's easier, feel free to just remove them for now!
    • Ensure code comments and logging statements are also in English for maintainability.
    • (Optional) If you're interested, we can discuss how to best organize non-English usage documentation in a future PR, but that's not a requirement for this merge.

We appreciate the effort to bring OpenRouter and multi-language support to Sensemaker!

the old implementation here might be better. Since this is an abstract base class, we don't want to specify the default in the constructor function, since this may often get overridden.

Jigsaw-Code#38 (comment)
It shouldn't be necessary to check this explicitly here, since this gets covered by the outputSchema

Jigsaw-Code#38 (comment)
@bestian bestian requested a review from metasoarous January 2, 2026 05:46
@bestian
Copy link
Author

bestian commented Jan 2, 2026

Thanks for the review @metasoarous!

I’ve addressed the review comments as much as possible and tested the changes locally.

I did attempt to use AI to translate all comments into English, but unfortunately it also modified some functional code, so I had to revert those changes.

As a result, some comments are still in Chinese for now — please feel free to edit or ignore them if needed.

Could you please take another look when you have time?
Thanks again!

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.

3 participants