Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/main-sync-to-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ name: 🔁 Sync main to dev branches
#
# Allow-list for `dev-*`:
# * any change (add/modify/rename/delete) under `.github/`, `.windsurf/`,
# `.githooks/`, or `hashes/` (CI, rules, git hooks, provider hashes);
# `.githooks/`, `hashes/`, or `tools/` (CI, rules, git hooks,
# provider hashes, automation scripts);
# * *modifications* (not add/rename/delete) to existing
# `src/SmartHopper.Providers.*/*ProviderModels.cs` files, so model
# verification flips, deprecations, and model-list updates propagate.
Expand Down Expand Up @@ -83,7 +84,7 @@ jobs:
// For `dev-*` (stabilization) branches, restrict to infra-only paths
// plus modifications to existing provider model registries.
const isStabilization = base !== 'dev' && base.startsWith('dev-');
const ALLOWED_PREFIXES = ['.github/', '.windsurf/', '.githooks/', 'hashes/'];
const ALLOWED_PREFIXES = ['.github/', '.windsurf/', '.githooks/', 'hashes/', 'tools/'];
// Matches: src/SmartHopper.Providers.<Provider>/<Provider>ProviderModels.cs
const PROVIDER_MODELS_RE = /^src\/SmartHopper\.Providers\.[^/]+\/[^/]*ProviderModels\.cs$/;
const isAllowedStabilizationFile = (file) => {
Expand Down Expand Up @@ -315,7 +316,7 @@ jobs:
`- Allow-listed files applied: ${process.env.ALLOWED_COUNT}`,
`- Non-allow-listed files left on \`main\`: ${process.env.SKIPPED_COUNT}`,
'',
'Allow-list for stabilization branches: any change under `.github/`, `.windsurf/`, `.githooks/`, `hashes/`, plus *modifications* to existing `src/SmartHopper.Providers.*/*ProviderModels.cs` files.',
'Allow-list for stabilization branches: any change under `.github/`, `.windsurf/`, `.githooks/`, `hashes/`, `tools/`, plus *modifications* to existing `src/SmartHopper.Providers.*/*ProviderModels.cs` files.',
'',
'This PR is kept open and its branch is refreshed on subsequent `main` updates.',
].join('\n');
Expand Down
12 changes: 0 additions & 12 deletions src/SmartHopper.Providers.MistralAI/MistralAIProviderModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -269,18 +269,6 @@ public override Task<List<AIModelCapabilities>> RetrieveModels()
Aliases = new List<string> { "voxtral-mini-latest" },
},

new AIModelCapabilities
{
Provider = provider,
Model = "voxtral-mini-transcribe-realtime-2602",
Capabilities = AICapability.AudioInput | AICapability.TextOutput,
SupportsStreaming = false,
Verified = false,
Rank = 9915,
Aliases = new List<string> { "voxtral-mini-realtime-2602", "voxtral-mini-realtime-latest" },
DiscouragedForTools = new List<string> { "*" },
},

new AIModelCapabilities
{
Provider = provider,
Expand Down
14 changes: 12 additions & 2 deletions tools/Update-ProviderModels.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -346,15 +346,25 @@ function Test-ProviderModelValidation($models) {

$nonDeprecatedModelsForValidation = @($models | Where-Object { $_.Deprecated -ne 'true' })

# Helper: Check if a model is discouraged for all tools
function Test-ModelDiscouragedForAllTools($model) {
if ($model.DiscouragedForTools -and $model.DiscouragedForTools.Count -gt 0) {
return $model.DiscouragedForTools -contains '*'
}
return $false
}

foreach ($composite in $CompositeDefaultCapabilities.GetEnumerator()) {
$capableModels = @($nonDeprecatedModelsForValidation | Where-Object {
Test-CapabilityExpressionHasAll $_.Capabilities $composite.Value
Test-CapabilityExpressionHasAll $_.Capabilities $composite.Value -and
-not (Test-ModelDiscouragedForAllTools $_)
})

if ($capableModels.Count -eq 0) { continue }

$defaultModels = @($nonDeprecatedModelsForValidation | Where-Object {
Test-CapabilityExpressionContains $_.Default $composite.Key
Test-CapabilityExpressionContains $_.Default $composite.Key -and
-not (Test-ModelDiscouragedForAllTools $_)
})

if ($defaultModels.Count -eq 0) {
Expand Down
Loading