mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-25 23:47:20 +00:00
docs: use alphabetical provider ordering
This commit is contained in:
@@ -188,7 +188,7 @@ async function promptWebToolsConfig(
|
||||
if (stored && SEARCH_PROVIDER_OPTIONS.some((e) => e.value === stored)) {
|
||||
return stored;
|
||||
}
|
||||
return SEARCH_PROVIDER_OPTIONS.find((e) => hasKeyForProvider(e.value))?.value ?? "perplexity";
|
||||
return SEARCH_PROVIDER_OPTIONS.find((e) => hasKeyForProvider(e.value))?.value ?? "brave";
|
||||
})();
|
||||
|
||||
note(
|
||||
|
||||
@@ -286,6 +286,6 @@ describe("setupSearch", () => {
|
||||
it("exports all 5 providers in SEARCH_PROVIDER_OPTIONS", () => {
|
||||
expect(SEARCH_PROVIDER_OPTIONS).toHaveLength(5);
|
||||
const values = SEARCH_PROVIDER_OPTIONS.map((e) => e.value);
|
||||
expect(values).toEqual(["perplexity", "brave", "gemini", "grok", "kimi"]);
|
||||
expect(values).toEqual(["brave", "gemini", "grok", "kimi", "perplexity"]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -22,18 +22,10 @@ type SearchProviderEntry = {
|
||||
};
|
||||
|
||||
export const SEARCH_PROVIDER_OPTIONS: readonly SearchProviderEntry[] = [
|
||||
{
|
||||
value: "perplexity",
|
||||
label: "Perplexity Search",
|
||||
hint: "Structured results · domain/language/freshness filters",
|
||||
envKeys: ["PERPLEXITY_API_KEY"],
|
||||
placeholder: "pplx-...",
|
||||
signupUrl: "https://www.perplexity.ai/settings/api",
|
||||
},
|
||||
{
|
||||
value: "brave",
|
||||
label: "Brave Search",
|
||||
hint: "Structured results · region-specific",
|
||||
hint: "Structured results · country/language/time filters",
|
||||
envKeys: ["BRAVE_API_KEY"],
|
||||
placeholder: "BSA...",
|
||||
signupUrl: "https://brave.com/search/api/",
|
||||
@@ -62,6 +54,14 @@ export const SEARCH_PROVIDER_OPTIONS: readonly SearchProviderEntry[] = [
|
||||
placeholder: "sk-...",
|
||||
signupUrl: "https://platform.moonshot.cn/",
|
||||
},
|
||||
{
|
||||
value: "perplexity",
|
||||
label: "Perplexity Search",
|
||||
hint: "Structured results · domain/country/language/time filters",
|
||||
envKeys: ["PERPLEXITY_API_KEY"],
|
||||
placeholder: "pplx-...",
|
||||
signupUrl: "https://www.perplexity.ai/settings/api",
|
||||
},
|
||||
] as const;
|
||||
|
||||
export function hasKeyInEnv(entry: SearchProviderEntry): boolean {
|
||||
@@ -222,7 +222,7 @@ export async function setupSearch(
|
||||
if (detected) {
|
||||
return detected.value;
|
||||
}
|
||||
return "perplexity";
|
||||
return "brave";
|
||||
})();
|
||||
|
||||
type PickerValue = SearchProvider | "__skip__";
|
||||
|
||||
Reference in New Issue
Block a user