https://api.moonshot.cn/v1/chat/completions) over the OpenAI-compatible
Chat Completions protocol. Models prefixed with kimi- or moonshot-
(default kimi-k2.6) are detected automatically, requests authenticate with
MOONSHOT_API_KEY (or KIMI_API_KEY), and Kimi k2 thinking mode is disabled
for deterministic annotation output.base_urls: URLs ending in /messages (or the Kimi Code base
https://api.kimi.com/coding) use the Anthropic Messages protocol, while
https://api.kimi.com/coding/v1 and other URLs use OpenAI-compatible Chat
Completions.return_reasoning argument to annotate_cell_types(). When set to
TRUE, the function returns a structured list per cluster containing
cell_type, marker_genes, and gene_expression fields instead of plain
cell-type labels, enabling downstream inspection of the marker genes and
expression rationale that support each annotation.Unknown results in annotate_cell_types() when
return_reasoning = TRUE. The response-line normalizer was stripping trailing
commas, which broke valid JSON arrays/objects returned by providers. The
request pipeline now preserves the raw response string for reasoning-mode JSON
parsing while keeping line normalization for plain-text annotation output.1., 2., …), preamble/header lines,
annotation-internal colons, a mid-list Unknown, a stray non-cluster
Summary:-style line, and out-of-order explicit labels are now all handled
correctly.base_resp$status_code) are now retried instead of
silently dropping the model from the consensus panel.is_error_response() no longer discards a valid multi-cluster response that
merely flags a single uncertain cluster with an Error: line.max_tokens, so
silently-dropped trailing clusters are diagnosable.model_config or ....annotate_cell_types() return contract.UnifiedLogger console output is now disabled by default (enable_console = FALSE). Use configure_logger(console_output = TRUE) to enable console logging.debug parameter + LLMCELLTYPE_DEBUG_CACHE env var) into single log_debug() approach; debug = TRUE temporarily enables console + DEBUG level via on.exit()warning() calls now paired with log_warn() for file-based audit; LLM consensus decisions logged to audit trailQwenProcessor now correctly exported; internal .qwen_endpoint_cache no longer exposed in public API@export misplacement in qwen_processor.R that exported internal state instead of the processor classtissue_name parameter in real API test callsprint() bypassing logging system in compare_model_predictions.Rcompare_model_predictions.Rmessage() format inconsistencies across consensus and comparison functionsmessage() + log_info() pairing across entire codebaseTaskState.TESTING from state machine (web component)0:(n-1) IDs)claude-sonnet-4-5-20250929) - Newest Sonnet model, same price as earlier Sonnetsclaude-opus-4-1-20250805) - Updated Opus modelclaude-sonnet-4-20250514, claude-opus-4-20250514)claude-sonnet-4.5, claude-opus-4.1)anthropic/claude-sonnet-4.5 and anthropic/claude-opus-4.120250929) remain stable and do not change over timeinstall.packages("mLLMCelltype")clusters_to_analyze: Allows users to specify exactly which clusters to analyze
force_rerun: Forces fresh analysis of controversial clusters
clusters_to_analyze for targeted workflowsnormalize_annotation(): Handles annotation variations (e.g., "T cells" vs "T lymphocytes")calculate_simple_consensus(): Fast local consensus calculation with CP and entropy metricsBaseAPIProcessor with consistent make_api_call() and extract_response_content() methodsapi_logs/ subdirectories within each sessionlogs/
├── mllm_YYYYMMDD_HHMMSS.log # Main session log
├── YYYYMMDD_HHMMSS/ # Session directory
│ ├── cluster_X_discussion.md # Discussion logs (fixed format)
│ └── api_logs/ # Complete API call logs (NEW)
│ ├── provider_model_timestamp.json
│ └── provider_model_timestamp.md
DiscussionLogger class and scattered write_log callsUnifiedLogger R6 class with structured JSON output, multi-level logging, and performance monitoringconfigure_logger(), get_logger(), log_info(), log_warn(), log_error(), log_debug()logger parameters from interactive_consensus_annotation() and related functionsDiscussionLogger class (still exported for backward compatibility but not recommended)gemini-2.0-flash-lite to supported models listgemini-2.0-flash or gemini-2.0-flash-lite for better performance and continued supportgemini-1.5-pro and gemini-1.5-flash will continue to work until September 24, 2025as.logical(from) error: Resolved critical error that occurred when processing large numbers of clusters (60+ clusters), which was caused by non-character data being passed to strsplit() functionstryCatch() blocks around all strsplit() operations in API processing functionsprocess_openrouter.R, process_anthropic.R, process_openai.R, process_deepseek.R, process_qwen.R, process_stepfun.R, process_minimax.R, process_zhipu.R, process_gemini.R, process_grok.R) now include improved error handlingunlist() operations to filter out NULL values and handle errors gracefullycheck_consensus.R to handle edge cases with malformed responsesprompt_templates.Rconsensus_annotation.R to ensure cluster indices start from 0