mycode-cli 0.13.2__py3-none-any.whl → 0.13.3__py3-none-any.whl
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.
- mycode_cli/config.py +8 -5
- mycode_cli/tui/chat.py +2 -2
- {mycode_cli-0.13.2.dist-info → mycode_cli-0.13.3.dist-info}/METADATA +2 -2
- {mycode_cli-0.13.2.dist-info → mycode_cli-0.13.3.dist-info}/RECORD +7 -7
- {mycode_cli-0.13.2.dist-info → mycode_cli-0.13.3.dist-info}/WHEEL +0 -0
- {mycode_cli-0.13.2.dist-info → mycode_cli-0.13.3.dist-info}/entry_points.txt +0 -0
- {mycode_cli-0.13.2.dist-info → mycode_cli-0.13.3.dist-info}/licenses/LICENSE +0 -0
mycode_cli/config.py
CHANGED
|
@@ -17,6 +17,7 @@ from mycode.providers import (
|
|
|
17
17
|
list_env_discoverable_providers,
|
|
18
18
|
list_supported_providers,
|
|
19
19
|
provider_api_key_from_env,
|
|
20
|
+
provider_can_authenticate_from_env,
|
|
20
21
|
provider_default_models,
|
|
21
22
|
provider_env_api_key_names,
|
|
22
23
|
)
|
|
@@ -667,12 +668,14 @@ def resolve_web_api_key(web: WebConfig, provider: Literal["tavily", "exa"]) -> s
|
|
|
667
668
|
return (os.environ.get(WEB_PROVIDER_ENV_VARS[provider]) or "").strip() or None
|
|
668
669
|
|
|
669
670
|
|
|
670
|
-
def
|
|
671
|
+
def provider_is_available(provider: ProviderConfig) -> bool:
|
|
671
672
|
"""Return whether a configured provider can authenticate right now."""
|
|
672
673
|
|
|
673
674
|
if provider.api_key_env_var:
|
|
674
675
|
return bool((os.environ.get(provider.api_key_env_var) or "").strip())
|
|
675
|
-
|
|
676
|
+
if provider.api_key:
|
|
677
|
+
return True
|
|
678
|
+
return provider_can_authenticate_from_env(provider.type)
|
|
676
679
|
|
|
677
680
|
|
|
678
681
|
def resolve_provider(
|
|
@@ -754,7 +757,7 @@ def _available_provider_references(settings: Settings) -> list[str]:
|
|
|
754
757
|
return
|
|
755
758
|
|
|
756
759
|
if provider_config:
|
|
757
|
-
if not
|
|
760
|
+
if not provider_is_available(provider_config):
|
|
758
761
|
return
|
|
759
762
|
configured_types_with_credentials.add(provider_type)
|
|
760
763
|
elif not provider_api_key_from_env(provider_type):
|
|
@@ -766,7 +769,7 @@ def _available_provider_references(settings: Settings) -> list[str]:
|
|
|
766
769
|
add(settings.default_provider)
|
|
767
770
|
|
|
768
771
|
for name, provider in settings.providers.items():
|
|
769
|
-
if
|
|
772
|
+
if provider_is_available(provider):
|
|
770
773
|
add(name)
|
|
771
774
|
|
|
772
775
|
for provider_id in list_env_discoverable_providers():
|
|
@@ -835,7 +838,7 @@ def _resolve_provider_runtime(
|
|
|
835
838
|
if not resolved_api_key:
|
|
836
839
|
resolved_api_key = provider_api_key_from_env(provider_type)
|
|
837
840
|
|
|
838
|
-
if not resolved_api_key:
|
|
841
|
+
if not resolved_api_key and not provider_can_authenticate_from_env(provider_type):
|
|
839
842
|
checked = ", ".join(provider_env_api_key_names(provider_type)) or "<api key env>"
|
|
840
843
|
raise ValueError(f"provider {selected_name!r} is selected but no API key is available; checked: {checked}")
|
|
841
844
|
|
mycode_cli/tui/chat.py
CHANGED
|
@@ -46,7 +46,7 @@ from mycode_cli.config import (
|
|
|
46
46
|
Settings,
|
|
47
47
|
get_settings,
|
|
48
48
|
normalize_reasoning_effort,
|
|
49
|
-
|
|
49
|
+
provider_is_available,
|
|
50
50
|
resolve_mycode_home,
|
|
51
51
|
resolve_provider,
|
|
52
52
|
)
|
|
@@ -379,7 +379,7 @@ def list_provider_options(settings: Settings) -> list[ProviderOption]:
|
|
|
379
379
|
api_base=config.base_url,
|
|
380
380
|
)
|
|
381
381
|
)
|
|
382
|
-
if
|
|
382
|
+
if provider_is_available(config):
|
|
383
383
|
configured_types.add(config.type)
|
|
384
384
|
|
|
385
385
|
for provider_name in list_env_discoverable_providers():
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: mycode-cli
|
|
3
|
-
Version: 0.13.
|
|
3
|
+
Version: 0.13.3
|
|
4
4
|
Summary: Minimal coding agent CLI and web UI built on mycode-sdk.
|
|
5
5
|
Project-URL: Homepage, https://github.com/legibet/mycode
|
|
6
6
|
Project-URL: Repository, https://github.com/legibet/mycode
|
|
@@ -25,7 +25,7 @@ Requires-Dist: beautifulsoup4>=4.15.0
|
|
|
25
25
|
Requires-Dist: fastapi>=0.139.0
|
|
26
26
|
Requires-Dist: httpx2>=2.10.0
|
|
27
27
|
Requires-Dist: markdownify>=1.2.3
|
|
28
|
-
Requires-Dist: mycode-sdk==0.13.
|
|
28
|
+
Requires-Dist: mycode-sdk==0.13.3
|
|
29
29
|
Requires-Dist: prompt-toolkit>=3.0.52
|
|
30
30
|
Requires-Dist: pydantic>=2.13.4
|
|
31
31
|
Requires-Dist: pyyaml>=6.0.3
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
mycode_cli/__init__.py,sha256=K9OoBd9T-1JdpfLnjTgRoVyv8gSnA4telBRzYSl23OE,231
|
|
2
|
-
mycode_cli/config.py,sha256=
|
|
2
|
+
mycode_cli/config.py,sha256=CM1G7393pRLEYvqnr3y9kpzL84tsZnYsp5XrRrPTv2U,30887
|
|
3
3
|
mycode_cli/main.py,sha256=p2kehJ-aIN36N-RnbchaE1YvTGDB3kynfwvlmUPzMhc,11636
|
|
4
4
|
mycode_cli/permissions.py,sha256=uzwDFnb3cskpAKy-DKHYwCg0rGeTdIOvFMtk5CsNjho,7904
|
|
5
5
|
mycode_cli/runtime.py,sha256=hs4XLD6_c2zknD4flxpmOVDfH_KJYwp3ZaZujl8UGxA,3099
|
|
@@ -398,12 +398,12 @@ mycode_cli/server/static/fonts/OFL.txt,sha256=5ntCh7US9uFmOUyAp0oMbVNwk26XBuNd-d
|
|
|
398
398
|
mycode_cli/server/static/fonts/SourceCodePro-Variable.woff2,sha256=i3dKqlE3o470D0rJ0225pe7hUrL2ZYnf3IL_AH_IcTU,22044
|
|
399
399
|
mycode_cli/server/static/fonts/SourceSans3-Variable.woff2,sha256=ehmnAn4SUlfTEMbb14rjowteoeN5TWCxK7KCJ6ADv9o,28740
|
|
400
400
|
mycode_cli/tui/__init__.py,sha256=5sPlJS3c8HdNEBwcF0bUuj8f8brAD-_6MNmF4Q_1Edg,69
|
|
401
|
-
mycode_cli/tui/chat.py,sha256=
|
|
401
|
+
mycode_cli/tui/chat.py,sha256=uRqdxJgy0y_xhFYSm_TSIr8TOGoJiZ0EjdWkqsTTwZw,36118
|
|
402
402
|
mycode_cli/tui/render.py,sha256=rTpES5SLHy23SE3Buhx9LTPXrt9-nRGcPOXm1SDnXtU,26175
|
|
403
403
|
mycode_cli/tui/state.py,sha256=vtG1NJQl6e7hI6ovlbyIsgckQiKbApnYPbRT0N0ybS0,1175
|
|
404
404
|
mycode_cli/tui/theme.py,sha256=HS3C1kSoIONrSaiSx22AWRLk1n6-T-Tn5iohCMewAg4,3455
|
|
405
|
-
mycode_cli-0.13.
|
|
406
|
-
mycode_cli-0.13.
|
|
407
|
-
mycode_cli-0.13.
|
|
408
|
-
mycode_cli-0.13.
|
|
409
|
-
mycode_cli-0.13.
|
|
405
|
+
mycode_cli-0.13.3.dist-info/METADATA,sha256=WdXLpc9-bVx1jEkHaZJlPnqCFFajh5RiHBOnfDmq4hc,4907
|
|
406
|
+
mycode_cli-0.13.3.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
|
|
407
|
+
mycode_cli-0.13.3.dist-info/entry_points.txt,sha256=1R7YN8dxJUy5AMC4q2J5Ly9xuEom3ZbTaa8xXwxuZyk,48
|
|
408
|
+
mycode_cli-0.13.3.dist-info/licenses/LICENSE,sha256=DSE6T-B9WhrWypr6H7y2kTZzoF1tef5xf7veUyImQsM,1064
|
|
409
|
+
mycode_cli-0.13.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|