@1mancompany/onemancompany 0.7.72 → 0.7.75
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.
- package/package.json +1 -1
- package/pyproject.toml +1 -1
- package/src/onemancompany/onboard.py +6 -6
package/package.json
CHANGED
package/pyproject.toml
CHANGED
|
@@ -158,8 +158,8 @@ def _step_welcome(console: Console) -> None:
|
|
|
158
158
|
|
|
159
159
|
def _format_price(price_str: str | None) -> str:
|
|
160
160
|
"""Format per-token price string to $/M tokens."""
|
|
161
|
-
if
|
|
162
|
-
return
|
|
161
|
+
if price_str is None or price_str == "":
|
|
162
|
+
return PRICE_NA
|
|
163
163
|
try:
|
|
164
164
|
per_token = float(price_str)
|
|
165
165
|
per_million = per_token * 1_000_000
|
|
@@ -226,8 +226,8 @@ def _fetch_provider_models(console: Console, provider: str, api_key: str) -> lis
|
|
|
226
226
|
models.append({
|
|
227
227
|
MODEL_KEY_ID: model_id,
|
|
228
228
|
MODEL_KEY_NAME: display_name,
|
|
229
|
-
MODEL_KEY_PROMPT_PRICE: _format_price(pricing.get(OR_FIELD_PROMPT)
|
|
230
|
-
MODEL_KEY_COMPLETION_PRICE: _format_price(pricing.get(OR_FIELD_COMPLETION)
|
|
229
|
+
MODEL_KEY_PROMPT_PRICE: _format_price(pricing.get(OR_FIELD_PROMPT) if pricing else None),
|
|
230
|
+
MODEL_KEY_COMPLETION_PRICE: _format_price(pricing.get(OR_FIELD_COMPLETION) if pricing else None),
|
|
231
231
|
MODEL_KEY_CONTEXT: m.get(OR_FIELD_CONTEXT_LENGTH) or m.get("context_length") or 0,
|
|
232
232
|
})
|
|
233
233
|
|
|
@@ -294,8 +294,8 @@ def _select_model_interactive(console: Console, all_models: list[dict]) -> str:
|
|
|
294
294
|
# Build choices with pricing info
|
|
295
295
|
choices = []
|
|
296
296
|
for m in all_models:
|
|
297
|
-
prompt_price =
|
|
298
|
-
comp_price =
|
|
297
|
+
prompt_price = m.get(MODEL_KEY_PROMPT_PRICE) or PRICE_NA
|
|
298
|
+
comp_price = m.get(MODEL_KEY_COMPLETION_PRICE) or PRICE_NA
|
|
299
299
|
label = f"{m[MODEL_KEY_ID]} [{prompt_price} / {comp_price}]"
|
|
300
300
|
choices.append({"name": label, "value": m[MODEL_KEY_ID]})
|
|
301
301
|
|