Skip to content

v2.1.30

Latest

Choose a tag to compare

@cagostino cagostino released this 28 Nov 21:46
a5d7be1
  • preserve reasoning content on stored assistant tool-call turns in responses (20e32f7, 3ac3720)
  • keep reasoning in decision responses (df165ac)
  • add named providers aigrow, onomeo, teamorouter, trustedrouter, and llmtr with env-var keys, default URLs, and required-key validation (f2f1781, 8ff8234, cc2154f, 05d58d6, ac0b09b, 3b6fb07, b027368)
  • add live /v1/models discovery for trustedrouter and llmtr with offline fallback sets (ac0b09b, 3b6fb07)
  • auto-detect trustedrouter/* and nyte/* model prefixes in lookup_provider (cc2154f)
  • merge extra_body dict kwargs into LiteLLM API params instead of dropping them (3ac3720)
  • rename UberLLM to MartLLM and change default API URL to https://api.martllm.com/v1 (3c62b71, dca76db, 3ac3720)
  • remove class-based decision API (DecisionSystem1, DecisionQuestion, DecisionRouter, DecisionsClient) in favor of flat dict-based helpers (decision_choice, decision_score, decision_noul, decision_predict, decision_route, get_decision_response) (62a7d80, cc2154f, a4a8118)
  • decision helpers return plain dicts with {type, choice|noul|score, confidence, probabilities} across all providers (cc2154f, 018b944)
  • add get_decision_response entrypoint in llm_funcs that resolves model/provider and dispatches to the decision module (cc2154f)
  • restore local-model support in decision_request with resolution order model_path -> NPCPY_DECISION_MODEL -> hosted/Ollama (a4a8118)
  • decision_predict now answers every question and keys results by name, reporting per-question errors instead of aborting the batch (a4a8118)
  • retain legend on parsed score answers so score indices stay interpretable (a4a8118)
  • get_ollama_decision honors NPCPY_SYSTEM1_OLLAMA_MODEL / NPCPY_OLLAMA_BASE_URL and falls back to the default model (a4a8118)
  • unsupported decision providers and Ollama unavailability now raise DecisionError instead of silent fallback (018b944)
  • export DecisionError, train_decision_model, load_decision_model, load_decision_examples from npcpy.gen.decision; drop DecisionsClient/DecisionsConfig/DecisionsError/parse_answers/load_decisions/available/require_available exports (62a7d80)
  • replace DecisionSystem1/DecisionQuestion/DecisionRouter globals in npc_compiler with get_decision_response and list_decision_models (cc2154f)
  • add /api/decision/models endpoint and pass provider/model/api_url/api_key through the decision route endpoint (cc2154f)
  • remove .to_dict() calls in serve.py decision/system1 endpoints, returning dicts directly (cc2154f)
  • decision mock server returns total_tokens and output_tokens in usage payloads (2d47444)
  • rewrite decision tests against the flat API and remove tests/test_gen_decisions.py (2d47444, 018b944, a4a8118)
  • remove leftover npcpy/gen/decisions.py.bak file (68a71c4)
  • forward top_k to generate() when sampling with the transformers backend (aa893a8)
  • forward top_p and top_k to generate() in LoRA, omitting them on greedy decoding (29825ae)
  • forward top_k to the MLX sampler in get_mlx_response (bff207f, 11c9b69)
  • pass temperature/top_p parameters to generate() on the AirLLM CUDA path (aff1051)
  • record the user turn in returned messages from the llamacpp backend without mutating the caller's list (baf516c, 3ac3720)
  • sum token usage across tool-loop turns in streaming responses and agent run_stream (9253b5a, 2d47444)
  • accept both SDK objects and plain dicts for streaming tool-call deltas via a shared _delta_field helper (2d47444)
  • keep name and arguments of Ollama streamed tool calls (98ac106, a0ed3e5)
  • return an error result and matching tool message for tool calls missing from tool_map (be1bcd5, 02ce8fc)
  • parse JSON/YAML format in the auto tool path when no tool is called (8a4feef, 8a1bf4e)
  • refactor duplicated JSON/YAML response parsing into a shared _parse_response_format helper used by Ollama and LiteLLM paths (3ac3720, cc2154f, b4e46ab)
  • accept YAML fenced blocks without a yaml language tag in response parsing (3ac3720)
  • fix memory search to honor the embedding_provider setting in search_similar_texts (4f6b939, cf47ebe)
  • switch memory search from get_ollama_embeddings to provider-aware get_embeddings (cc2154f)
  • add Ollama embeddings support via /api/embed, including base64 image inputs for multimodal embedding models (c7bc25d, bf4d57b, a5d7be1)
  • route image paths in embeddings to a vision model or raise a clear error (6bc0cf5, 01d4691)
  • send every reference image when using OpenAI image edits and pass multiple images as an array to images.edit (87333a7, 4b9a063)
  • call images.generate instead of images.edit for empty or None OpenAI attachments (4b9a063, 3ab394d, 018b944)
  • honor n_images for Gemini flash-image models by looping generate_content requests (4b9a063, f6bfc81, 7a8afa7)
  • convert non-RGB/L/CMYK images to RGB before resizing in image loading (62a7d80)
  • fix compress_image to handle palette, grayscale-alpha, 1, and I;16 modes before JPEG save, with transparent pixels becoming white (2a16661, 018b944)
  • fix image alpha detection to cover LA, PA, and palette images with transparency before converting to RGBA
  • use the JSON loader for .json files in load_file_contents (62a7d80, c849209)
  • fix YAML frontmatter parsing to match --- delimiters only on their own lines, handling trailing whitespace/CRLF (cc2154f, a72ba5f, 15c3350)
  • fix agents2npc frontmatter delimiter parsing so inline --- in descriptions no longer truncates metadata (15c3350)
  • update OpenAI realtime default model to gpt-realtime-1.5 and move TTS to the GA Realtime API with type/output_modalities/nested audio session shape (62a7d80, dbc17e3, efc5027)
  • drop OpenAI-Beta header and use additional_headers for websockets connect, requiring websockets>=14 (62a7d80, 0ba7e64)
  • handle response.output_audio.delta and response.output_text.delta event types in realtime receive (62a7d80)
  • honor explicit Kokoro lang_code instead of overriding it with the voice-based default (62a7d80, 2d47444, 4546be0)
  • bump litellm from 1.91.1 to 1.111.0 (2d47444, df90768)
  • bump version from 2.1.29 to 2.1.30 (2d47444, 80f4e52)
  • add tests for AirLLM sampling parameter forwarding, OpenAI realtime TTS GA API, Kokoro language code handling, auto-tools format parsing, and agent frontmatter conversion (2d47444)
  • rework README decision-model docs around the flat get_decision_response function and question_type (choice/noul/score), and fill in missing decision examples (b0f1f90)
  • document additional decision-model providers (typesafe, cloudflare, openrouter, databricks, fireworks_ai, azure_ai, litellm_proxy) in README
  • add provider docs for LLMTR, onomeo, TeamoRouter, and TrustedRouter; rename UberLLM section to MartLLM
  • update llm-responses guide provider table with aigrow, llmtr, onomeo, teamorouter, trustedrouter, and MartLLM entries
  • rewrite system-one guide hosted decisions section to describe unified get_decision_response surface and provider table
  • update decision examples to use get_decision_response, decision_predict, and decision_route instead of class-based API (675e447)

What's Changed

New Contributors

Full Changelog: v2.1.29...v2.1.30