legionio 1.9.40 → 1.9.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 13eae4c67a25af55b4f7b02423e493a1c102831f204a34368ea16e04f529d5ff
4
- data.tar.gz: 44219061da324461fc19a69fc23b7ad1108fd29f696f27133e15b47e3de98e33
3
+ metadata.gz: b24faa2a8eb6db1841c7e6e181b9f1470dc2c3167efd58008d923cdfa25c41f8
4
+ data.tar.gz: f0af7a1459f4edb91751fb71161a02675f4b49c91c194d64100d7d33f7cbccbf
5
5
  SHA512:
6
- metadata.gz: a92ef53aba4416fb0a777fa0be7c4a8b822f1c102cbe45b0fa6d46b7c052db1501fa7e9b05922c3e9188ef589c15f202632b2b4efc9a53476cea6843c62cfa4d
7
- data.tar.gz: dc10e34337589079aae562d8db6557c95e9c43b246b8a9f66c05d7b153413947d06bd28f26603aea95ba95987db9ba214b7ac97de40701d2b75b6190032fbcb0
6
+ metadata.gz: a8a3eb0fdf4fc17f105f282b8b1f4cd8ffface0429f3e74622f8d321b7c29488a0515fe67e8b50dbcc28cee70d151a4d03aa103bc0c78cb6405efdbecc3be6bc
7
+ data.tar.gz: ad3250e699dce50fc0edc7786dae7f2fa9371ab6639fe4d14f113a9c3aa47a04249d7cd7ef6928de0cb922456c82eb8157a09b792608c62972cf9941dbe52329
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Legion Changelog
2
2
 
3
+ ## [1.9.41] - 2026-06-02
4
+
5
+ ### Fixed
6
+ - CLI: `setup proxy-mode` now upserts `[model_providers.legionio]` with `api_key = "legion"` into `~/.codex/config.toml` instead of writing the deprecated `profile = "legionio"` key (removed by Codex)
7
+ - CLI: model catalog format corrected to use `slug`/`display_name`/`supported_reasoning_levels` fields
8
+ - CLI: `model_catalog_json` removed from top-level `config.toml` (breaks Mac app strict schema parsing); kept only in `legionio.config.toml` for `--profile legionio` CLI use
9
+
3
10
  ## [1.9.40] - 2026-06-01
4
11
 
5
12
  ### Added
@@ -788,7 +788,7 @@ module Legion
788
788
 
789
789
  [model_providers.legionio]
790
790
  name = "LegionIO"
791
- env_key = "LEGION_API_KEY"
791
+ api_key = "legion"
792
792
  base_url = "#{base_url}"
793
793
  wire_api = "responses"
794
794
  TOML
@@ -810,16 +810,16 @@ module Legion
810
810
  catalog = {
811
811
  models: [
812
812
  {
813
- id: 'legionio',
814
- name: 'LegionIO',
815
- context_size: 262_144,
816
- context_window: 262_144
813
+ slug: 'legionio',
814
+ display_name: 'LegionIO',
815
+ context_window: 262_144,
816
+ context_size: 262_144
817
817
  },
818
818
  {
819
- id: 'auto',
820
- name: 'LegionIO (auto)',
821
- context_size: 262_144,
822
- context_window: 262_144
819
+ slug: 'auto',
820
+ display_name: 'LegionIO (auto)',
821
+ context_window: 262_144,
822
+ context_size: 262_144
823
823
  }
824
824
  ]
825
825
  }
@@ -830,16 +830,35 @@ module Legion
830
830
  raise Thor::Error, "Failed to write #{catalog_path}: #{e.message}"
831
831
  end
832
832
 
833
- def write_codex_main_config(codex_dir, _base_url, written, _skipped)
833
+ def write_codex_main_config(codex_dir, base_url, written, _skipped)
834
834
  config_path = File.join(codex_dir, 'config.toml')
835
835
  existing = File.exist?(config_path) ? File.read(config_path) : ''
836
836
 
837
- if existing.match?(/^\s*profile\s*=\s*"legionio"/)
838
- written << config_path
839
- return
840
- end
837
+ # Upsert [model_providers.legionio] block so the provider appears in the
838
+ # model picker in both the CLI and the Codex Mac app.
839
+ # No profile = line (removed by Codex). No model_catalog_json at top level
840
+ # (Codex enforces a strict schema with required fields that breaks the app).
841
+ provider_block = <<~TOML
842
+
843
+ [model_providers.legionio]
844
+ name = "LegionIO"
845
+ api_key = "legion"
846
+ base_url = "#{base_url}"
847
+ wire_api = "responses"
848
+ TOML
849
+
850
+ updated = existing.dup
851
+
852
+ # Only match uncommented [model_providers.legionio] section headers
853
+ updated = if updated.match?(/^\[model_providers\.legionio\]/)
854
+ updated.gsub(
855
+ /^\[model_providers\.legionio\].*?(?=\n\[|\z)/m,
856
+ provider_block.lstrip
857
+ )
858
+ else
859
+ "#{updated.rstrip}\n#{provider_block}"
860
+ end
841
861
 
842
- updated = existing.empty? ? "profile = \"legionio\"\n" : "profile = \"legionio\"\n\n#{existing.lstrip}"
843
862
  File.write(config_path, updated)
844
863
  written << config_path
845
864
  rescue StandardError => e
@@ -872,7 +891,7 @@ module Legion
872
891
  }
873
892
 
874
893
  codex-legionio() {
875
- codex --provider legionio "$@"
894
+ codex --profile legionio "$@"
876
895
  }
877
896
  ZSH
878
897
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Legion
4
- VERSION = '1.9.40'
4
+ VERSION = '1.9.41'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: legionio
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.40
4
+ version: 1.9.41
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity