Skip to content

Fix chat titles relying on Anthropic key#16

Merged
bcongdon merged 3 commits intomeltylabs:mainfrom
bcongdon:fix-chat-titles
Dec 19, 2025
Merged

Fix chat titles relying on Anthropic key#16
bcongdon merged 3 commits intomeltylabs:mainfrom
bcongdon:fix-chat-titles

Conversation

@bcongdon
Copy link
Copy Markdown
Collaborator

Addresses #15 by making it so that the OpenRouter API key can be used for chat title generation if an Anthropic API key is not available

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Additional Comments (2)

  1. src/core/chorus/simpleLLM.ts, line 37 (link)

    logic: params.model is being ignored here - should use params.model instead of hardcoding "claude-haiku-4-5". Callers pass "claude-3-5-sonnet-latest".

  2. src/core/chorus/simpleLLM.ts, line 70-78 (link)

    logic: Missing max_tokens parameter - should respect params.maxTokens.

1 file reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The fallback approach works, but I'm wondering if we should consider a slightly different direction.

Currently simpleLLM.ts is tightly coupled to specific providers (Anthropic, and now OpenRouter). As we add more providers, this could get unwieldy with a growing cascade of fallbacks. For example I created a PR earlier #13 to add claude code support and I'll need to update this file to get titles generation working in that case.

What do you think about creating a lightweight abstraction that picks whichever provider the user has configured?

Each provider just implements a simple method - say complete(). The existing IProvider interface is too heavy for this (streaming, tools, attachments), so a separate lightweight interface for simple completions might make sense.

Wdyt?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Furthermore, even with the Anthropic API key configured, it fails to generate the chat names. So it's something else.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Furthermore, even with the Anthropic API key configured, it fails to generate the chat names. So it's something else.

I think that's because it's hard-coded to use sonnet 3.5, which isn't served in the Anthropic API anymore.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

What do you think about creating a lightweight abstraction that picks whichever provider the user has configured?

This seems very reasonable 👍

…ated code.

Update API calls in MessageAPI and ProjectAPI to utilize the new completion mode for summarization.
@Ghvstcode
Copy link
Copy Markdown

Looks good 👍🏼

@rmichelena
Copy link
Copy Markdown

rmichelena commented Dec 16, 2025

while trying to merge this in my fork, got what seems a very valid comment from Cursor:

rmichelena#2 (comment)

@bcongdon
Copy link
Copy Markdown
Collaborator Author

while trying to merge this in my fork, got what seems a very valid comment from Cursor:

Thanks for pointing that out. Fixed 👍

@bcongdon bcongdon merged commit 6eab821 into meltylabs:main Dec 19, 2025
1 check passed
@z3ugma
Copy link
Copy Markdown

z3ugma commented Dec 19, 2025

Now that this and a few other PRs are merged, are there GH Actions to create a nightly build for testing? Or to automate Release bundles in GitHub?

@cbh123
Copy link
Copy Markdown
Contributor

cbh123 commented Dec 19, 2025

@z3ugma you can download the nightly build at https://cdn.crabnebula.app/download/chorus/chorus/latest/platform/dmg-aarch64?channel=qa. Every push to main triggers a new release. We're managing releases on CrabNebula but moving to GitHub releases at some point probably makes more sense.

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.

5 participants