@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1mancompany/onemancompany",
3
- "version": "0.7.72",
3
+ "version": "0.7.75",
4
4
  "description": "The AI Operating System for One-Person Companies",
5
5
  "bin": {
6
6
  "onemancompany": "bin/cli.js"
package/pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "onemancompany"
3
- version = "0.7.72"
3
+ version = "0.7.75"
4
4
  description = "A one-man company simulation with pixel art visualization and LangChain AI agents"
5
5
  requires-python = ">=3.12"
6
6
  dependencies = [
@@ -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 not price_str:
162
- return PRICE_FREE
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)) if pricing else "",
230
- MODEL_KEY_COMPLETION_PRICE: _format_price(pricing.get(OR_FIELD_COMPLETION)) if pricing else "",
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 = _format_price(m.get(MODEL_KEY_PROMPT_PRICE))
298
- comp_price = _format_price(m.get(MODEL_KEY_COMPLETION_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