Conversation
…into feat/byok
#33 In short, it'll 1. [Frontend] Recognize that user is trying to add a citation (trigger text is `\cite{`) 2. [Frontend] Temporarily suppress default Overleaf dropdown suggestions 3. [Frontend] Get the last sentence as context for LLM 4. [Backend] Fetch bibliography in `.bib` files as raw text, and remove irrelevant fields to save tokens 5. [Backend] Call XtraMCP to get paper abstract, using paper title as key 6. [Backend] Query a fast LLM (hardcoded to `gpt-5.2` for now) to get at most 3 citation keys 7. [Frontend] Suppress default Overleaf tab-completion to allow users to accept citation suggestions
### Key changes: - Select models by ID instead of slug so users can have multiple API keys for the same slug - Add loading spinner for save/edit actions
feat: BYOK enhancements
4ndrelim
left a comment
There was a problem hiding this comment.
@wjiayis I think there might be some drift between your branch and main. Some of the changes in this PR e.g. in .github/workflows are already committed. Merging this branch now might make the commit history slightly messy. Also, I noticed some of Kah Seng's BYOK changes are also here. It is slightly difficult to isolate the changes introduced for cost tracking.
Could you raise a PR that only reflects your changes for cost tracking?
|
I see the issue. Your branch is behind The problem is that Those workflow file diffs should be fine, but your branch should still not include or reflect the BYOK changes. I will fix |
Conflicts: - hack/values-prd.yaml: take main's empty nodeSelector defaults - internal/api/chat/create_conversation_message_stream_v2.go: keep cost-tracking signatures (UserID, ProjectID), drop duplicated llmProvider setup - internal/services/toolkit/client/completion_v2.go: keep ChatCompletionV2/ ChatCompletionStreamV2 signatures with UsageCost return - internal/services/toolkit/client/get_conversation_title_v2.go: keep userID/ projectID args - webapp/_webapp/src/views/chat/footer/toolbar/model-selection.tsx: take main's grouped custom/built-in models with divider - webapp/_webapp/src/views/chat/footer/toolbar/selection.tsx: keep isDivider field - webapp/_webapp/src/views/settings/sections/api-key-settings.tsx: take main's BYOK UI (model count tooltip, Save/Edit/Delete labels) Co-authored-by: Cursor <[email protected]>
The repo uses bun (per CLAUDE.md), and bun.lock already matched package.json on main. The 5354-line diff in package-lock.json was incidental churn from a stray `npm install` and unrelated to the cost-tracking feature. Co-authored-by: Cursor <[email protected]>
No description provided.