| 1 | # frozen_string_literal: true |
| 2 | |
| 3 | # Classifies a requested model as a paid siGit Code Cloud tier vs a free |
| 4 | # on-device model. The neutral cloud tiers (Fast/Balanced/Large) and the legacy |
| 5 | # `claude-*` / `anthropic/*` aliases run on Onde Cloud and cost money; everything |
| 6 | # else (GGUF `owner/repo/file` ids) runs on the user's own device and is free. |
| 7 | class CloudCatalog |
| 8 | CLOUD_TIERS = %w[onde-fast onde-balanced onde-large].freeze |
| 9 | |
| 10 | def self.cloud_tier?(model) |
| 11 | id = model.to_s.strip.downcase |
| 12 | return false if id.empty? |
| 13 | |
| 14 | CLOUD_TIERS.include?(id) || id.start_with?("claude-", "anthropic/") |
| 15 | end |
| 16 | end |