Skip to content

fix(web): show api key before base url in every model provider form - #20361

Merged
wangq8 merged 1 commit into
infiniflow:mainfrom
dcc123456:fix/model-provider-api-key-before-base-url
Sep 29, 2026
Merged

wangq8 merged 1 commit into
infiniflow:mainfrom
dcc123456:fix/model-provider-api-key-before-base-url

Conversation

@dcc123456

Copy link
Copy Markdown
Collaborator

Summary

Provider instance cards rendered the credential and endpoint inputs in inconsistent orders, forcing users to re-scan each provider's form. Reorder the field configs so the api key always precedes the base url.

  • buildLocalConfig covers all local/compatible factories (Ollama, VLLM, LMStudio, NewAPI, AIMLAPI, OpenRouter, FunASR, MWS, ...) since custom fields are merged by name and keep the base ordering.
  • Fix the per-provider configs that declared their own order: AzureOpenAI, SoMark, OpenDataLoader, PaddleOCR and PaddleOCR.local.

Only the order of the fields entries changed; no field attribute or transform is touched.

Provider instance cards rendered the credential and endpoint inputs in
inconsistent orders, forcing users to re-scan each provider's form. Reorder
the field configs so the api key always precedes the base url.

- buildLocalConfig covers all local/compatible factories (Ollama, VLLM,
  LMStudio, NewAPI, AIMLAPI, OpenRouter, FunASR, MWS, ...) since custom
  fields are merged by name and keep the base ordering.
- Fix the per-provider configs that declared their own order: AzureOpenAI,
  SoMark, OpenDataLoader, PaddleOCR and PaddleOCR.local.

Only the order of the `fields` entries changed; no field attribute or
transform is touched.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@dcc123456
dcc123456 requested a review from wangq8 September 29, 2026 07:06
@dcc123456 dcc123456 added 🐞 bug Something isn't working, pull request that fix bug. ci Continue Integration labels Sep 29, 2026
@dcc123456
dcc123456 marked this pull request as draft September 29, 2026 07:06
@dcc123456
dcc123456 marked this pull request as ready for review September 29, 2026 07:06
@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 3b849cb3-13c6-48fe-afde-82c00fd4ed0d

📥 Commits

Reviewing files that changed from the base of the PR and between 9b67a41 and b0a3eda.

📒 Files selected for processing (2)
  • web/src/pages/user-setting/setting-model/provider-schema/field-config/local-llm-configs.ts
  • web/src/pages/user-setting/setting-model/provider-schema/field-config/provider-config-map.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The provider configuration forms reorder selected URL, server, API key, and access-token fields. Their field definitions and validation-related settings remain unchanged.

Changes

Provider Form Field Ordering

Layer / File(s) Summary
Reorder provider form fields
web/src/pages/user-setting/setting-model/provider-schema/field-config/local-llm-configs.ts, web/src/pages/user-setting/setting-model/provider-schema/field-config/provider-config-map.ts
Moves base_url after api_key for local LLM and Azure OpenAI; moves the OpenDataLoader API key before its API server; moves the PaddleOCR URL after its access token; and moves the SoMark API key before its base URL. Field definitions are unchanged.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested reviewers: lynn-inf

Merge Risk: ⚪ Minimal · up to b0a3e

The affected forms will display the API key or access-token fields before the related URL or server fields. No behavior or validation regression is indicated, so the change appears ready to merge.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main change: showing the API key before the base URL in all model provider forms.
Description check ✅ Passed The description includes the required Summary section and explains the purpose, scope, affected provider configurations, and unchanged field attributes and transforms.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

I’m a rabbit checking fields in a row,
API keys now come before URLs that follow.
PaddleOCR’s token leads its address,
OpenDataLoader’s key takes its place.
The field settings stay as they were,
I twitch my ears and hop from there.

Comment @coderabbitai help to get the list of available commands.

@wangq8
wangq8 merged commit 66fb8d0 into infiniflow:main Sep 29, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working, pull request that fix bug. ci Continue Integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants