Skip to content

feat: BYOK#161

Merged
kah-seng merged 83 commits intomainfrom
feat/byok
May 1, 2026
Merged

feat: BYOK#161
kah-seng merged 83 commits intomainfrom
feat/byok

Conversation

@kah-seng
Copy link
Copy Markdown
Member

Summary

Adds BYOK features (including base URL, API key and param configurations), also added changes as per suggestions from #157.

Tested Providers

Stable: GPT, Claude, Gemini, MiniMax, OpenRouter
Unstable: DeepSeek, GLM

Screenshots

image
image
image
Closes #118 Closes #149 Closes #157

Junyi-99 and others added 30 commits January 27, 2026 02:58
#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
@kah-seng kah-seng requested review from 4ndrelim and Junyi-99 April 21, 2026 03:44
@kah-seng kah-seng self-assigned this Apr 21, 2026
@kah-seng kah-seng added the enhancement New feature or request label Apr 21, 2026
@4ndrelim 4ndrelim requested a review from wjiayis April 22, 2026 19:40
@4ndrelim
Copy link
Copy Markdown
Member

@wjiayis Hi Jia Yi, I recall you had some great feedback to improve user experience / make it more intuitive for new users. Could you kindly help to check if your concerns have been addressed too? Thanks!

Copy link
Copy Markdown
Member

@4ndrelim 4ndrelim left a comment

Choose a reason for hiding this comment

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

Clarification required.

Also, do we know the issue with deepseek and GLM? If not, no worries, we can proceed but raise an issue for those 2 first.

Comment thread internal/services/toolkit/client/utils_v2.go
Comment thread internal/models/llm_provider.go
@4ndrelim
Copy link
Copy Markdown
Member

@kah-seng
Screenshot 2026-04-23 at 3 57 21 AM

I noticed in the screenshot here there are 3 custom models. May i verify the expected behaviour:
If endpoints and APIs are provided for all 3, they will appear as in the above. If any one has missing either API or endpoints, it will be faded display?

Copy link
Copy Markdown
Member

@wjiayis wjiayis left a comment

Choose a reason for hiding this comment

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

Played around with it, LGTM! Thanks @kah-seng !

@kah-seng
Copy link
Copy Markdown
Member Author

@kah-seng Screenshot 2026-04-23 at 3 57 21 AM

I noticed in the screenshot here there are 3 custom models. May i verify the expected behaviour: If endpoints and APIs are provided for all 3, they will appear as in the above. If any one has missing either API or endpoints, it will be faded display?

@4ndrelim only the models that have been added successfully will show up in the selection menu (models that have missing API keys/endpoints are invalid and can't be added in the first place)

@4ndrelim 4ndrelim removed the request for review from Junyi-99 May 1, 2026 08:36
Copy link
Copy Markdown
Member

@4ndrelim 4ndrelim left a comment

Choose a reason for hiding this comment

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

lgtm. need to check on gpt5.1 behavior.

@wjiayis
Copy link
Copy Markdown
Member

wjiayis commented May 1, 2026

I notice that for gpt-5.1, when reasoning_effort is not specified, temperature = 0.6 is ok. But when I specified reasoning_effort = "medium", temperature = 0.6 throws the following error:

openai.BadRequestError: Error code: 400 - {'error': {'message': "Unsupported value: 'temperature' does not support 0.6 with this model. Only the default (1) value is supported.", 'type': 'invalid_request_error', 'param': 'temperature', 'code': 'unsupported_value'}}

@kah-seng kah-seng merged commit 37d5f6c into main May 1, 2026
1 check passed
@kah-seng kah-seng deleted the feat/byok branch May 1, 2026 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Good-to-have BYOK frontend improvements [Feature Request] Add a custom base URL and API key. [Feature Request] BYOK

4 participants