feat(stage-ui): add n1n provider#968
Conversation
Summary of ChangesHello @n1n-api, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds n1n.ai as a new OpenAI-compatible provider. The implementation largely follows the pattern of existing providers in the codebase. My review identified a potential runtime error related to the handling of an optional API key during provider creation. I have provided a suggestion to make this more robust. Otherwise, the changes look good.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
36db483 to
78606d2
Compare
|
I have read the CLA Document and I hereby sign the CLA |
…fineProvider pattern Refactor OpenAI and OpenAI-compatible speech/transcription providers to use the unified `defineProvider()` pattern (matching PR moeru-ai#968 n1n provider pattern) instead of separate registries. This unifies all providers under a single consistent API. Changes: - Refactor OpenAI speech/transcription providers to use `defineProvider()` with `tasks` and `extraMethods` instead of `defineSpeechProvider`/`defineTranscriptionProvider` - Refactor OpenAI-compatible speech/transcription providers similarly - Add `convertProviderDefinitionToMetadata()` converter function to bridge unified pattern with existing store's `ProviderMetadata` format - Update store to use new converter function instead of old separate converters - Mark old base interfaces and registry exports as deprecated for backward compatibility - Fix settings index page to filter out routes with empty titles (preventing empty menu items from rendering) BREAKING CHANGE: Speech and transcription providers now use the unified `defineProvider()` pattern. Old `defineSpeechProvider` and `defineTranscriptionProvider` functions are deprecated but still available for backward compatibility. Refs: PR moeru-ai#961, PR moeru-ai#968
…fineProvider pattern Refactor OpenAI and OpenAI-compatible speech/transcription providers to use the unified `defineProvider()` pattern (matching PR moeru-ai#968 n1n provider pattern) instead of separate registries. This unifies all providers under a single consistent API. Changes: - Refactor OpenAI speech/transcription providers to use `defineProvider()` with `tasks` and `extraMethods` instead of `defineSpeechProvider`/`defineTranscriptionProvider` - Refactor OpenAI-compatible speech/transcription providers similarly - Add `convertProviderDefinitionToMetadata()` converter function to bridge unified pattern with existing store's `ProviderMetadata` format - Update store to use new converter function instead of old separate converters - Mark old base interfaces and registry exports as deprecated for backward compatibility - Fix settings index page to filter out routes with empty titles (preventing empty menu items from rendering) BREAKING CHANGE: Speech and transcription providers now use the unified `defineProvider()` pattern. Old `defineSpeechProvider` and `defineTranscriptionProvider` functions are deprecated but still available for backward compatibility. Refs: PR moeru-ai#961, PR moeru-ai#968
|
As of the current UI, the chat providers already take up a whole page. I don't feel like it's a great idea to keep adding cards for every single provider out there, at least not for the OpenAI-compatible ones like this, since users can already use it with a trivial baseurl setup. I think this PR can wait until we have a better UI to accommodate it |
Thank you for considering us! Can not wait to see the new UI in the soon future :) |
…nified defineProvider pattern - Migrate all 7 speech providers to unified defineProvider() pattern: - elevenlabs - deepgram-tts - microsoft-speech - index-tts-vllm - alibaba-cloud-model-studio - volcengine - player2-speech - Migrate all 2 transcription providers to unified defineProvider() pattern: - browser-web-speech-api - aliyun-nls-transcription - Fix convertProviderDefinitionToMetadata bug where nameKey/descriptionKey were storing translated strings instead of i18n keys. Use identity function (keyExtractor) instead of translator (tWrapper) to extract i18n key strings. - Update providers.ts to use convertProviderDefinitionToMetadata for all migrated providers instead of old pattern. - Register all migrated providers in providers/index.ts This completes the migration requested by Niko in PR moeru-ai#968 to unify provider patterns across the codebase.
Add n1n.ai as an OpenAI-compatible AI provider. Includes English and Simplified Chinese translations.