OrcaRouter翻訳プラグインを追加 - #696
Conversation
| if (discovery.IsError || NormalizeEndpoint(discovery.Issuer).AbsoluteUri.TrimEnd('/') != Authority | ||
| || !discovery.CodeChallengeMethodsSupported.Contains("S256")) | ||
| { | ||
| throw new InvalidOperationException("Invalid OrcaRouter discovery response."); |
There was a problem hiding this comment.
以下のレスポンスが返ってきているがエラー扱いになる
{"authorization_endpoint":"http://www.orcarouter.ai/auth","code_challenge_methods_supported":["S256","plain"],"grant_types_supported":["authorization_code"],"issuer":"http://www.orcarouter.ai","response_types_supported":["code"],"token_endpoint":"http://www.orcarouter.ai/api/v1/auth/keys","token_endpoint_auth_methods_supported":["none"]}
There was a problem hiding this comment.
対応しました(a5f8648)。Discovery の http スキームを IdentityModel が先にエラーにしないよう RequireHttps = false を設定しました。受け取った issuer / authorization endpoint / token endpoint は、引き続き www.orcarouter.ai・標準ポート等を検証したうえで、実際に使用する URL を必ず HTTPS へ正規化します。いただいたレスポンスをそのまま使う回帰テストも追加し、成功を確認しています。
| -p:FileVersion=${{ steps.gitversion.outputs.assemblySemFileVer }} ` | ||
| -p:InformationalVersion=${{ steps.gitversion.outputs.informationalVersion }} ` | ||
| -p:DecryptKey="${{ secrets.WINDOWTRANSLATOR_DECRYPTKEY }}" | ||
| - name: Upload WindowTranslator.Abstractions |
There was a problem hiding this comment.
パッケージごとにステップはやめて。パッケージが増えても対応不要な形式にして。
There was a problem hiding this comment.
対応しました(a5f8648)。パッケージ名ごとの固定ステップを削除し、pack 内の .nupkg を動的に列挙して、各ファイルを skipArchive 付きで個別成果物としてアップロードするスクリプトへ変更しました。今後パッケージが増えてもワークフローの追記は不要で、0件の場合はエラーになります。2つのダミーパッケージを使い、個別アップロード呼び出しになることも確認しました。
There was a problem hiding this comment.
追記です。初回CI(Package #250)で通常の run ステップには成果物API用のランタイムトークンが渡らないことを確認したため、bc85f0a でアップローダーをローカルNodeアクション化し、固定依存をバンドルしました。動的列挙・パッケージごとの個別アップロードという構成は維持したまま、アクション実行コンテキストで成果物APIを呼び出す形に修正しています。
There was a problem hiding this comment.
再実行した Package #251 は成功しました。生成された14個の .nupkg が、すべてファイル名ごとの独立した成果物として登録されていることも確認済みです。
There was a problem hiding this comment.
これ必要?
非同期で一覧取れたらリストプロパティに値を設定して通知してバインド経由で普通のComboboxでも更新できない?
There was a problem hiding this comment.
対応しました(a5f8648)。独自の DynamicItemsSourceAttribute / IDynamicItemsSource / DynamicItemsComboBox を削除し、OrcaRouterOptions.ModelItems を非同期更新して変更通知する形にしました。Model は PropertyTools 標準の ItemsSourceProperty / DisplayMemberPath / SelectedValuePath を使い、通常の ComboBox で更新されます。入れ子のプラグイン設定でも ItemsSource の所有元へ正しくバインドし、取得中に保存済みモデルが失われないようにしています。
概要
Closes#692
sk-orca-*キーを対象設定のPluginParamsに保存し、設定UIでは非表示化https://api.orcarouter.ai/v1と OpenAI .NET SDK を使った翻訳を実装/v1/modelsからモデル名・入出力料金を取得し、orcarouter/autoを既定値とするモデル選択を追加DynamicItemsSourceComboBox を追加.NET Core Packageで生成した各.nupkgを、ZIP化しない個別のGitHub Actions成果物として公開動作確認
dotnet test WindowTranslator.Tests/WindowTranslator.Tests.csproj --filter FullyQualifiedName~OrcaRouterTests(5件成功)dotnet test WindowTranslator.Tests/WindowTranslator.Tests.csproj --filter FullyQualifiedName~LocalizedReadmeSelectorTests(成功)dotnet pack Plugins/WindowTranslator.Plugin.OrcaRouterPlugin/WindowTranslator.Plugin.OrcaRouterPlugin.csproj(成功、README・22言語セクション・全言語リソースを含むことを確認)dotnet nuget-license(成功)DependencyWithIncompatibleLibStillInstallsCompatibleNativeAssets1件のみ、compatible.dllが一時配置先に存在しないため失敗し、単独再実行でも再現(今回変更していないNuGetインストーラー系テスト)