Skip to content

Added Support for online Models from Open Router with --online option#2

Open
ashishpawar517 wants to merge 8 commits into
Jacky040124:mainfrom
ashishpawar517:main
Open

Added Support for online Models from Open Router with --online option#2
ashishpawar517 wants to merge 8 commits into
Jacky040124:mainfrom
ashishpawar517:main

Conversation

@ashishpawar517

Copy link
Copy Markdown

So you can use any models from OpenRouter to query

@Jacky040124

Copy link
Copy Markdown
Owner

Thank you so much for contributing !! This is a great feature, I will review and change and get back to you either today or tomorrow.

@Jacky040124

Copy link
Copy Markdown
Owner

Thank you so much for taking the time to contribute to this project! I really appreciate your effort in adding online model support - this is definitely a feature that would be valuable.

However, after reviewing the changes, I have a few concerns about the current approach:

Issues with the current implementation:

  1. Temporary-only usage: The --online flag only works for single commands
    and doesn't persist the model choice. Users would need to use --online model-name every time, which isn't ideal for workflow.

  2. Breaking changes: The function signatures in pkg/ui.go have been
    modified (RenderResultView and PrintFormattedResearch now require a
    modelName parameter), which could break existing code that calls these
    functions.

  3. Complex integration: The changes modify core logic across multiple files
    in ways that feel a bit invasive to the existing architecture.

Alternative approach I'd prefer:

Instead of the --online flag, I think a better UX would be:

ptn model set-custom
# Opens a TUI interface prompting user to enter any OpenRouter model name
# Saves it persistently as the selected model
# Future `ptn` commands use this custom model automatically

This would:
- Make custom models persistent (no need to specify each time)
- Provide a clean TUI interface for model input
- Minimize changes to existing core logic
- Follow the existing ptn model command pattern

Would you be interested in reworking the implementation with this approach? I'm
happy to discuss the technical details further.

Again, thank you for the contribution - the core idea is great, I just think we
can make the implementation cleaner! 🙏

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