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 +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/legion/cli/setup_command.rb +35 -16
- data/lib/legion/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b24faa2a8eb6db1841c7e6e181b9f1470dc2c3167efd58008d923cdfa25c41f8
|
|
4
|
+
data.tar.gz: f0af7a1459f4edb91751fb71161a02675f4b49c91c194d64100d7d33f7cbccbf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
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
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
813
|
+
slug: 'legionio',
|
|
814
|
+
display_name: 'LegionIO',
|
|
815
|
+
context_window: 262_144,
|
|
816
|
+
context_size: 262_144
|
|
817
817
|
},
|
|
818
818
|
{
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
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,
|
|
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
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
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 --
|
|
894
|
+
codex --profile legionio "$@"
|
|
876
895
|
}
|
|
877
896
|
ZSH
|
|
878
897
|
|
data/lib/legion/version.rb
CHANGED