augint-shell 0.124.0__tar.gz → 0.124.1__tar.gz
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.
- augint_shell-0.124.0/README.md → augint_shell-0.124.1/PKG-INFO +25 -7
- augint_shell-0.124.0/PKG-INFO → augint_shell-0.124.1/README.md +11 -21
- {augint_shell-0.124.0 → augint_shell-0.124.1}/pyproject.toml +1 -1
- {augint_shell-0.124.0 → augint_shell-0.124.1}/pyproject.toml.orig +1 -1
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/__init__.py +1 -1
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/opencode.py +67 -13
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/templates/ai-shell.yaml +1 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/acp.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/assets/__init__.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/assets/comfyui/__init__.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/assets/comfyui/provision.sh +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/cache.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/cdp_relay.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/claude_login.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/cli/__init__.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/cli/__main__.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/cli/commands/__init__.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/cli/commands/acp.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/cli/commands/llm.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/cli/commands/manage.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/cli/commands/tools.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/cli/commands/vpn.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/config.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/container.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/defaults.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/exceptions.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/expo.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/gpu.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/local_chrome.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/models.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/qr.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/remote.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/scaffold.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/standalone.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/t3.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/templates/__init__.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/templates/augint-env.example +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/templates/container/__init__.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/templates/container/context.md +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/templates/n8n/workflows/chat_with_ollama.json +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/templates/n8n/workflows/text_to_speech.json +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/templates/n8n/workflows/transcribe_audio.json +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/typeahead.py +0 -0
- {augint_shell-0.124.0 → augint_shell-0.124.1}/src/ai_shell/vpn.py +0 -0
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: augint-shell
|
|
3
|
+
Version: 0.124.1
|
|
4
|
+
Summary: Launch AI coding tools and local LLMs in Docker containers
|
|
5
|
+
Author: svange
|
|
6
|
+
Requires-Dist: docker>=7.0.0
|
|
7
|
+
Requires-Dist: click>=8.1.0
|
|
8
|
+
Requires-Dist: rich>=14.0
|
|
9
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
10
|
+
Requires-Dist: pyyaml>=6.0
|
|
11
|
+
Requires-Dist: segno>=1.6
|
|
12
|
+
Requires-Python: >=3.12
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
|
|
1
15
|
# augint-shell
|
|
2
16
|
|
|
3
17
|
[](https://github.com/svange/augint-shell/actions/workflows/publish.yaml)
|
|
@@ -69,16 +83,18 @@ One command replaces the old Makefile + docker-compose.yml workflow.
|
|
|
69
83
|
### Prerequisites
|
|
70
84
|
|
|
71
85
|
- Docker, or Podman with the `docker` CLI shim (`podman-docker`) and `DOCKER_HOST` pointing at its socket
|
|
72
|
-
-
|
|
86
|
+
- [uv](https://docs.astral.sh/uv/) (it installs its own Python; **not required** when using the standalone binary)
|
|
73
87
|
- (Optional) NVIDIA GPU + drivers for local LLM acceleration
|
|
74
88
|
|
|
75
89
|
### First-time setup
|
|
76
90
|
|
|
77
91
|
```bash
|
|
78
|
-
|
|
79
|
-
#
|
|
92
|
+
uv tool install augint-shell
|
|
93
|
+
# update later: uv tool upgrade augint-shell
|
|
80
94
|
```
|
|
81
95
|
|
|
96
|
+
Do not install it with `pip` into a system Python. When that Python is removed, its `Scripts\ai-shell.exe` (or `bin/ai-shell`) stays behind, can stay first on `PATH`, and exits with no output.
|
|
97
|
+
|
|
82
98
|
#### Without Python or PyPI (standalone binary)
|
|
83
99
|
|
|
84
100
|
On systems that block Python package registries or do not allow `pip` / host Python installations, `ai-shell` is also distributed as a single self-contained executable that requires no root/admin privileges and no host Python:
|
|
@@ -587,8 +603,10 @@ A model given as `bedrock-mantle/openai.gpt-5.4` (or unqualified) is moved to th
|
|
|
587
603
|
- Otherwise, `ai-shell` makes a short-term Bedrock API key from your AWS profile (`--aws-profile` / `--profile`, or `opencode.aws_profile`) before it starts OpenCode. The key is the same one `aws-bedrock-token-generator` makes. It lasts 12 hours, or less when the SSO session ends sooner. Run `aws sso login --profile <profile>` first. Disable with `--no-generate-token`.
|
|
588
604
|
- The profile needs `bedrock:CallWithBearerToken`, `bedrock-mantle:CallWithBearerToken`, `bedrock-mantle:ListModels` and `bedrock-mantle:CreateInference` for Mantle, and `bedrock:InvokeModel` on the inference profile and its models for Grok.
|
|
589
605
|
- **Default Mantle agent models**:
|
|
590
|
-
-
|
|
591
|
-
-
|
|
606
|
+
- Commercial AWS: primary agents (`plan`, `build`) `bedrock-mantle-openai/openai.gpt-5.6-terra`; subagents (`explore`, `general`) and `small_model` `bedrock-mantle-openai/openai.gpt-5.6-luna`.
|
|
607
|
+
- AWS GovCloud: `bedrock-mantle/openai.gpt-oss-120b` for all of them. On 2026-11-19 a standalone GovCloud account got "not available for this account" for GPT-5.6 Terra, Luna and GPT-5.4, and Grok on that account had a small daily token quota ("Too many tokens per day"). Set `model` and `subagent_model` when your account has access to more.
|
|
608
|
+
- **Model limits**: every Bedrock model in `opencode.json` gets a `limit` (context and output tokens, from the Bedrock model cards; 128000/16384 when no figure is published). Without one, OpenCode reads any failed request as a context overflow and the real error is hidden.
|
|
609
|
+
- **No Anthropic models in GovCloud**: a GovCloud config adds `amazon-bedrock` (OpenCode's built-in Bedrock provider, which lists Anthropic models) to `disabled_providers`. Your own entries in that list are kept.
|
|
592
610
|
|
|
593
611
|
```bash
|
|
594
612
|
# Commercial AWS (defaults to us-east-1) using an AWS SSO profile
|
|
@@ -603,14 +621,14 @@ aws sso login --profile ai-gov
|
|
|
603
621
|
ai-shell opencode --aws --aws-partition govcloud --aws-profile ai-gov
|
|
604
622
|
```
|
|
605
623
|
|
|
606
|
-
A standalone GovCloud account
|
|
624
|
+
A standalone GovCloud account with access to GPT-5.6 Terra (for planning and building) and GPT-5.6 Luna (for subagents), and an optional own model on a GPU instance that you reach through a Session Manager port forward on host port 8000. Put this in `~/.augint/.ai-shell.yaml`:
|
|
607
625
|
|
|
608
626
|
```yaml
|
|
609
627
|
opencode:
|
|
610
628
|
provider: bedrock-mantle
|
|
611
629
|
aws_partition: govcloud
|
|
612
630
|
aws_profile: ai-gov
|
|
613
|
-
model: openai.gpt-5.6-terra # or xai.grok-4.7
|
|
631
|
+
model: openai.gpt-5.6-terra # or xai.grok-4.7; without these two lines: openai.gpt-oss-120b
|
|
614
632
|
subagent_model: openai.gpt-5.6-luna
|
|
615
633
|
endpoints:
|
|
616
634
|
govcloud-gpu:
|
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.3
|
|
2
|
-
Name: augint-shell
|
|
3
|
-
Version: 0.124.0
|
|
4
|
-
Summary: Launch AI coding tools and local LLMs in Docker containers
|
|
5
|
-
Author: svange
|
|
6
|
-
Requires-Dist: docker>=7.0.0
|
|
7
|
-
Requires-Dist: click>=8.1.0
|
|
8
|
-
Requires-Dist: rich>=14.0
|
|
9
|
-
Requires-Dist: python-dotenv>=1.0.0
|
|
10
|
-
Requires-Dist: pyyaml>=6.0
|
|
11
|
-
Requires-Dist: segno>=1.6
|
|
12
|
-
Requires-Python: >=3.12
|
|
13
|
-
Description-Content-Type: text/markdown
|
|
14
|
-
|
|
15
1
|
# augint-shell
|
|
16
2
|
|
|
17
3
|
[](https://github.com/svange/augint-shell/actions/workflows/publish.yaml)
|
|
@@ -83,16 +69,18 @@ One command replaces the old Makefile + docker-compose.yml workflow.
|
|
|
83
69
|
### Prerequisites
|
|
84
70
|
|
|
85
71
|
- Docker, or Podman with the `docker` CLI shim (`podman-docker`) and `DOCKER_HOST` pointing at its socket
|
|
86
|
-
-
|
|
72
|
+
- [uv](https://docs.astral.sh/uv/) (it installs its own Python; **not required** when using the standalone binary)
|
|
87
73
|
- (Optional) NVIDIA GPU + drivers for local LLM acceleration
|
|
88
74
|
|
|
89
75
|
### First-time setup
|
|
90
76
|
|
|
91
77
|
```bash
|
|
92
|
-
|
|
93
|
-
#
|
|
78
|
+
uv tool install augint-shell
|
|
79
|
+
# update later: uv tool upgrade augint-shell
|
|
94
80
|
```
|
|
95
81
|
|
|
82
|
+
Do not install it with `pip` into a system Python. When that Python is removed, its `Scripts\ai-shell.exe` (or `bin/ai-shell`) stays behind, can stay first on `PATH`, and exits with no output.
|
|
83
|
+
|
|
96
84
|
#### Without Python or PyPI (standalone binary)
|
|
97
85
|
|
|
98
86
|
On systems that block Python package registries or do not allow `pip` / host Python installations, `ai-shell` is also distributed as a single self-contained executable that requires no root/admin privileges and no host Python:
|
|
@@ -601,8 +589,10 @@ A model given as `bedrock-mantle/openai.gpt-5.4` (or unqualified) is moved to th
|
|
|
601
589
|
- Otherwise, `ai-shell` makes a short-term Bedrock API key from your AWS profile (`--aws-profile` / `--profile`, or `opencode.aws_profile`) before it starts OpenCode. The key is the same one `aws-bedrock-token-generator` makes. It lasts 12 hours, or less when the SSO session ends sooner. Run `aws sso login --profile <profile>` first. Disable with `--no-generate-token`.
|
|
602
590
|
- The profile needs `bedrock:CallWithBearerToken`, `bedrock-mantle:CallWithBearerToken`, `bedrock-mantle:ListModels` and `bedrock-mantle:CreateInference` for Mantle, and `bedrock:InvokeModel` on the inference profile and its models for Grok.
|
|
603
591
|
- **Default Mantle agent models**:
|
|
604
|
-
-
|
|
605
|
-
-
|
|
592
|
+
- Commercial AWS: primary agents (`plan`, `build`) `bedrock-mantle-openai/openai.gpt-5.6-terra`; subagents (`explore`, `general`) and `small_model` `bedrock-mantle-openai/openai.gpt-5.6-luna`.
|
|
593
|
+
- AWS GovCloud: `bedrock-mantle/openai.gpt-oss-120b` for all of them. On 2026-11-19 a standalone GovCloud account got "not available for this account" for GPT-5.6 Terra, Luna and GPT-5.4, and Grok on that account had a small daily token quota ("Too many tokens per day"). Set `model` and `subagent_model` when your account has access to more.
|
|
594
|
+
- **Model limits**: every Bedrock model in `opencode.json` gets a `limit` (context and output tokens, from the Bedrock model cards; 128000/16384 when no figure is published). Without one, OpenCode reads any failed request as a context overflow and the real error is hidden.
|
|
595
|
+
- **No Anthropic models in GovCloud**: a GovCloud config adds `amazon-bedrock` (OpenCode's built-in Bedrock provider, which lists Anthropic models) to `disabled_providers`. Your own entries in that list are kept.
|
|
606
596
|
|
|
607
597
|
```bash
|
|
608
598
|
# Commercial AWS (defaults to us-east-1) using an AWS SSO profile
|
|
@@ -617,14 +607,14 @@ aws sso login --profile ai-gov
|
|
|
617
607
|
ai-shell opencode --aws --aws-partition govcloud --aws-profile ai-gov
|
|
618
608
|
```
|
|
619
609
|
|
|
620
|
-
A standalone GovCloud account
|
|
610
|
+
A standalone GovCloud account with access to GPT-5.6 Terra (for planning and building) and GPT-5.6 Luna (for subagents), and an optional own model on a GPU instance that you reach through a Session Manager port forward on host port 8000. Put this in `~/.augint/.ai-shell.yaml`:
|
|
621
611
|
|
|
622
612
|
```yaml
|
|
623
613
|
opencode:
|
|
624
614
|
provider: bedrock-mantle
|
|
625
615
|
aws_partition: govcloud
|
|
626
616
|
aws_profile: ai-gov
|
|
627
|
-
model: openai.gpt-5.6-terra # or xai.grok-4.7
|
|
617
|
+
model: openai.gpt-5.6-terra # or xai.grok-4.7; without these two lines: openai.gpt-oss-120b
|
|
628
618
|
subagent_model: openai.gpt-5.6-luna
|
|
629
619
|
endpoints:
|
|
630
620
|
govcloud-gpu:
|
|
@@ -50,6 +50,25 @@ DEFAULT_BEDROCK_MANTLE_PRIMARY_MODEL = "openai.gpt-5.6-terra"
|
|
|
50
50
|
DEFAULT_BEDROCK_MANTLE_SUBAGENT_MODEL = "openai.gpt-5.6-luna"
|
|
51
51
|
BEDROCK_MANTLE_DEFAULT_PRIMARY_MODEL = DEFAULT_BEDROCK_MANTLE_PRIMARY_MODEL
|
|
52
52
|
BEDROCK_MANTLE_DEFAULT_SUBAGENT_MODEL = DEFAULT_BEDROCK_MANTLE_SUBAGENT_MODEL
|
|
53
|
+
# GovCloud defaults: the models a standalone GovCloud account can call. On
|
|
54
|
+
# 2026-11-19 Bedrock in us-gov-west-1 answered "not available for this account"
|
|
55
|
+
# for GPT-5.6 Terra, Luna and GPT-5.4, and Grok had a small daily token quota.
|
|
56
|
+
DEFAULT_GOVCLOUD_PRIMARY_MODEL = "openai.gpt-oss-120b"
|
|
57
|
+
DEFAULT_GOVCLOUD_SUBAGENT_MODEL = "openai.gpt-oss-120b"
|
|
58
|
+
# OpenCode gives a model without a limit {context: 0, output: 0}. It then reads
|
|
59
|
+
# any failed request as a context overflow and starts a compaction that fails
|
|
60
|
+
# too, which hides the real error. Figures from the Bedrock model cards; a model
|
|
61
|
+
# without a published figure gets the conservative fallback.
|
|
62
|
+
BEDROCK_MODEL_LIMITS: dict[str, dict[str, int]] = {
|
|
63
|
+
"openai.gpt-oss-120b": {"context": 128000, "output": 16384},
|
|
64
|
+
"openai.gpt-oss-20b": {"context": 128000, "output": 16384},
|
|
65
|
+
"xai.grok-4.7": {"context": 500000, "output": 32768},
|
|
66
|
+
}
|
|
67
|
+
BEDROCK_FALLBACK_LIMIT: dict[str, int] = {"context": 128000, "output": 16384}
|
|
68
|
+
# OpenCode's built-in Bedrock provider lists Anthropic models from the same AWS
|
|
69
|
+
# credentials. Anthropic models are not allowed for GovCloud work, so a GovCloud
|
|
70
|
+
# config turns that provider off.
|
|
71
|
+
GOVCLOUD_DISABLED_PROVIDERS: tuple[str, ...] = ("amazon-bedrock",)
|
|
53
72
|
# Models listed in the OpenCode model picker. Mantle serves gpt-oss on /v1 and
|
|
54
73
|
# GPT-5.x on /openai/v1, and Grok is served by bedrock-runtime, so each list
|
|
55
74
|
# becomes its own provider.
|
|
@@ -662,6 +681,23 @@ def _drop_misrouted_mantle_models(config: dict[str, Any]) -> None:
|
|
|
662
681
|
del models[model_id]
|
|
663
682
|
|
|
664
683
|
|
|
684
|
+
def bedrock_model_limit(model_id: str) -> dict[str, int]:
|
|
685
|
+
"""OpenCode's ``limit`` for a Bedrock model ID (inference profile prefix ignored)."""
|
|
686
|
+
bare = _INFERENCE_PROFILE_PREFIX.sub("", model_id)
|
|
687
|
+
bare = re.sub(r"-\d+:\d+$", "", bare)
|
|
688
|
+
return dict(BEDROCK_MODEL_LIMITS.get(bare, BEDROCK_FALLBACK_LIMIT))
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
def _bedrock_model_entry(model_id: str) -> dict[str, Any]:
|
|
692
|
+
return {"name": model_id, "limit": bedrock_model_limit(model_id)}
|
|
693
|
+
|
|
694
|
+
|
|
695
|
+
def _model_entry(provider: str, model_id: str) -> dict[str, Any]:
|
|
696
|
+
if provider in MANTLE_PROVIDER_IDS:
|
|
697
|
+
return _bedrock_model_entry(model_id)
|
|
698
|
+
return {"name": model_id}
|
|
699
|
+
|
|
700
|
+
|
|
665
701
|
def deep_merge_dict(base: dict[str, Any], patch: dict[str, Any]) -> dict[str, Any]:
|
|
666
702
|
"""Recursively merge *patch* into a copy of *base* without clobbering sibling keys."""
|
|
667
703
|
merged: dict[str, Any] = dict(base)
|
|
@@ -713,27 +749,35 @@ def build_opencode_config_patch(
|
|
|
713
749
|
elif endpoints:
|
|
714
750
|
resolved_default_provider = endpoints[0].name
|
|
715
751
|
|
|
752
|
+
providers_patch: dict[str, Any] = {}
|
|
753
|
+
resolved_region = ""
|
|
754
|
+
if mantle_active:
|
|
755
|
+
resolved_region = resolve_bedrock_mantle_region(
|
|
756
|
+
region=effective_region_arg, partition=aws_partition
|
|
757
|
+
)
|
|
758
|
+
govcloud = resolved_region.startswith("us-gov-")
|
|
759
|
+
|
|
716
760
|
effective_primary = primary_model.strip()
|
|
717
761
|
if not effective_primary:
|
|
718
762
|
if mantle_active:
|
|
719
|
-
effective_primary =
|
|
763
|
+
effective_primary = (
|
|
764
|
+
DEFAULT_GOVCLOUD_PRIMARY_MODEL if govcloud else DEFAULT_BEDROCK_MANTLE_PRIMARY_MODEL
|
|
765
|
+
)
|
|
720
766
|
elif endpoints and endpoints[0].models:
|
|
721
767
|
effective_primary = endpoints[0].models[0]
|
|
722
768
|
|
|
723
769
|
effective_subagent = subagent_model.strip()
|
|
724
770
|
if not effective_subagent:
|
|
725
771
|
if mantle_active:
|
|
726
|
-
effective_subagent =
|
|
772
|
+
effective_subagent = (
|
|
773
|
+
DEFAULT_GOVCLOUD_SUBAGENT_MODEL
|
|
774
|
+
if govcloud
|
|
775
|
+
else DEFAULT_BEDROCK_MANTLE_SUBAGENT_MODEL
|
|
776
|
+
)
|
|
727
777
|
elif effective_primary:
|
|
728
778
|
effective_subagent = effective_primary
|
|
729
779
|
|
|
730
|
-
providers_patch: dict[str, Any] = {}
|
|
731
|
-
resolved_region = ""
|
|
732
|
-
|
|
733
780
|
if mantle_active:
|
|
734
|
-
resolved_region = resolve_bedrock_mantle_region(
|
|
735
|
-
region=effective_region_arg, partition=aws_partition
|
|
736
|
-
)
|
|
737
781
|
api_key = f"{{env:{BEDROCK_BEARER_TOKEN_VAR}}}"
|
|
738
782
|
providers_patch[BEDROCK_MANTLE_PROVIDER_ID] = {
|
|
739
783
|
"npm": OPENAI_COMPATIBLE_NPM,
|
|
@@ -742,7 +786,7 @@ def build_opencode_config_patch(
|
|
|
742
786
|
"baseURL": bedrock_mantle_base_url(region=resolved_region, partition=aws_partition),
|
|
743
787
|
"apiKey": api_key,
|
|
744
788
|
},
|
|
745
|
-
"models": {m:
|
|
789
|
+
"models": {m: _bedrock_model_entry(m) for m in BEDROCK_MANTLE_DEFAULT_MODELS},
|
|
746
790
|
}
|
|
747
791
|
providers_patch[BEDROCK_MANTLE_OPENAI_PROVIDER_ID] = {
|
|
748
792
|
"npm": OPENAI_COMPATIBLE_NPM,
|
|
@@ -753,7 +797,7 @@ def build_opencode_config_patch(
|
|
|
753
797
|
),
|
|
754
798
|
"apiKey": api_key,
|
|
755
799
|
},
|
|
756
|
-
"models": {m:
|
|
800
|
+
"models": {m: _bedrock_model_entry(m) for m in BEDROCK_MANTLE_OPENAI_DEFAULT_MODELS},
|
|
757
801
|
}
|
|
758
802
|
runtime_models = [
|
|
759
803
|
with_inference_profile(m, resolved_region) for m in BEDROCK_RUNTIME_DEFAULT_BASE_MODELS
|
|
@@ -767,7 +811,7 @@ def build_opencode_config_patch(
|
|
|
767
811
|
),
|
|
768
812
|
"apiKey": api_key,
|
|
769
813
|
},
|
|
770
|
-
"models": {m:
|
|
814
|
+
"models": {m: _bedrock_model_entry(m) for m in runtime_models},
|
|
771
815
|
}
|
|
772
816
|
|
|
773
817
|
for ep in endpoints:
|
|
@@ -794,7 +838,9 @@ def build_opencode_config_patch(
|
|
|
794
838
|
for agent_name in PRIMARY_AGENTS:
|
|
795
839
|
agent_patch[agent_name] = {"model": qual_primary}
|
|
796
840
|
if prim_prov and prim_prov in providers_patch and prim_bare:
|
|
797
|
-
providers_patch[prim_prov].setdefault("models", {})[prim_bare] =
|
|
841
|
+
providers_patch[prim_prov].setdefault("models", {})[prim_bare] = _model_entry(
|
|
842
|
+
prim_prov, prim_bare
|
|
843
|
+
)
|
|
798
844
|
|
|
799
845
|
if effective_subagent:
|
|
800
846
|
qual_sub, sub_prov, sub_bare = _route_mantle_model(
|
|
@@ -805,12 +851,16 @@ def build_opencode_config_patch(
|
|
|
805
851
|
for agent_name in SUBAGENTS:
|
|
806
852
|
agent_patch[agent_name] = {"model": qual_sub}
|
|
807
853
|
if sub_prov and sub_prov in providers_patch and sub_bare:
|
|
808
|
-
providers_patch[sub_prov].setdefault("models", {})[sub_bare] =
|
|
854
|
+
providers_patch[sub_prov].setdefault("models", {})[sub_bare] = _model_entry(
|
|
855
|
+
sub_prov, sub_bare
|
|
856
|
+
)
|
|
809
857
|
|
|
810
858
|
if providers_patch:
|
|
811
859
|
patch["provider"] = providers_patch
|
|
812
860
|
if agent_patch:
|
|
813
861
|
patch["agent"] = agent_patch
|
|
862
|
+
if govcloud:
|
|
863
|
+
patch["disabled_providers"] = list(GOVCLOUD_DISABLED_PROVIDERS)
|
|
814
864
|
|
|
815
865
|
return patch
|
|
816
866
|
|
|
@@ -858,6 +908,10 @@ def sync_opencode_config(
|
|
|
858
908
|
)
|
|
859
909
|
|
|
860
910
|
merged = deep_merge_dict(existing, patch)
|
|
911
|
+
disabled = patch.get("disabled_providers")
|
|
912
|
+
if disabled and isinstance(existing.get("disabled_providers"), list):
|
|
913
|
+
kept = [p for p in existing["disabled_providers"] if p not in disabled]
|
|
914
|
+
merged["disabled_providers"] = kept + list(disabled)
|
|
861
915
|
_drop_misrouted_mantle_models(merged)
|
|
862
916
|
merged.setdefault("$schema", OPENCODE_SCHEMA_URL)
|
|
863
917
|
target.write_text(json.dumps(merged, indent=2) + "\n", encoding="utf-8")
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
# aws_region: us-gov-west-1 # OpenCode only; aws.bedrock_region is used only in the same partition
|
|
29
29
|
# aws_profile: my-gov-profile # makes the short-term AWS_BEARER_TOKEN_BEDROCK
|
|
30
30
|
# model: openai.gpt-5.6-terra # plan + build agents; or openai.gpt-5.4, xai.grok-4.7
|
|
31
|
+
# # default: Terra/Luna commercial, openai.gpt-oss-120b GovCloud
|
|
31
32
|
# subagent_model: openai.gpt-5.6-luna # explore + general subagents
|
|
32
33
|
# claude_compat: false # true = also read CLAUDE.md and .claude/.agents skills
|
|
33
34
|
# local_chrome: false # Chrome DevTools MCP (same as --local-chrome)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|