`ov chat --with-bot` regressed in 0.4.5: a config with only a `vlm` section
(no `bot.agents`) and a `server` whose effective auth mode is `api_key` fails
with `litellm.InternalServerError: OpenAIException - Missing credentials ...
set OPENAI_API_KEY`, even though the user configured e.g. deepseek. 0.4.3
worked.
Root cause: the 0.4.5 ov_server auth rewrite made
`_merge_current_ov_server_config` call `_fill_user_api_key_from_ovcli()` ->
`load_ovcli_config()` whenever the effective auth mode is `api_key`. When the
user only configured `vlm` and has no valid ovcli identity, that raises
`ValueError`, which is re-raised. `load_config()`'s broad
`except (json.JSONDecodeError, ValueError)` then swallows it and silently falls
back to a default `Config()` — model `openai/doubao-seed-2-0-pro-260215`, empty
provider, empty api_key. `_make_provider` takes the legacy LiteLLMProvider
branch on that `openai/*` model with no key -> the OpenAI missing-credentials
error. In 0.4.3 the ovcli lookup only ran in `remote` mode (api_key present),
so a vlm-only config never hit it.
Fix: a missing/invalid ovcli (OpenViking user) identity only affects OpenViking
memory/file tools — it must not abort loading the rest of the bot config. On
`load_ovcli_config()` failure, warn and continue with the user api_key unset
instead of re-raising. Degraded OpenViking auth is still surfaced separately by
validate_openviking_auth(). This restores 0.4.3 behavior for vlm-only configs
while keeping the user-key auto-fill when ovcli is configured.
Adds a regression test covering both the ovcli-fails and ovcli-succeeds paths.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* feat: add ov chat command and refactor channel architecture
- Add ChatChannel for interactive chat with User:/Bot: labels and thinking display
- Add SingleTurnChannel for one-off -m mode with minimal output
- Add StdioChannel for JSON-based IPC with Rust TUI
- Rename 'vikingbot agent' to 'vikingbot chat'
- Add Python 'ov chat' command that proxies to vikingbot chat
- Add Rust 'ov chat' command that proxies to vikingbot chat
- Refactor ChannelManager to support both config and direct channel addition
- Update event types for better thinking/tool_call/tool_result display
- Default session key: cli__chat__default
* feishu channel opt
* feishu channel opt
* fix: IM channels only process RESPONSE messages
- Update feishu, dingtalk, discord, email, qq, slack, telegram, whatsapp
- Add filter in send() to skip thinking/tool_call/tool_result messages
- Only process is_normal_message (RESPONSE type)
* feat(tracing): add abstract trace decorator for session-aware observability
- Add vikingbot/utils/tracing.py with backend-agnostic @trace decorator
- Use ContextVar for session_id propagation through nested calls
- Implement lazy binding to Langfuse via propagate_attributes
- Update AgentLoop._process_message() to use @trace decorator
- Simplify langfuse initialization logging in commands.py
- Add session_id parameter to litellm_provider.chat()
- Clean up redundant code in utils/helpers.py
The trace decorator abstracts observability concerns, allowing future
switching between Langfuse, OpenTelemetry, or other backends without
modifying business logic.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
* feat: add tracing base on langfuse
* 1. feishu channel opt
2. support multi users
* 1. feishu channel opt
2. support multi users
* 1. feishu channel opt
2. support multi users
* fix(langfuse): use module-level propagate_attributes from SDK v3
The propagate_attributes function is a module-level export in Langfuse
Python SDK v3, not a method of the Langfuse client instance.
- Import propagate_attributes from langfuse module
- Remove misleading warning when propagate_kwargs is empty
- Reduce log noise by changing info logs to debug
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: unify workspace_id naming and improve tracing integration
Standardize terminology and clean up tracing/Langfuse integration:
- Rename sandbox_key to workspace_id across agent, memory, and tools
- Delete deprecated langfuse_decorator.py (superseded by tracing.py)
- Fix Langfuse v3 SDK propagate_attributes usage (module-level function)
- Improve session_id extraction with better signature inspection
- Reduce log noise in Langfuse attribute propagation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* 1. feishu channel opt
2. support multi users
* feat(tracing): add user_id extraction support for Langfuse
Add extract_user_id parameter to @trace decorator to enable user
tracking in Langfuse. This allows grouping traces by user in the UI.
- Add extract_user_id parameter to @trace decorator
- Extract user_id from InboundMessage.sender_id
- Pass user_id to Langfuse propagate_attributes
- Update loop.py to use new lambda style for session_id extraction
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix http server
* fix http server
* fix http server
* fix(langfuse): change propagate_attributes log level to info
* feat(tracing): add @observe decorator to create Langfuse traces
* fix(tracing): apply @observe at decoration time, not runtime
* fix http server
* fix(tracing): add detailed diagnostics for Langfuse client status
* fix(langfuse): add diagnostic logging for client initialization
* fix(langfuse): add diagnostic logging for config check
* 飞书chat
* opt http client
* docs(readme): add Langfuse observability configuration guide
* opt http client
* opt http client
* opt http client
* opt http client
* opt http client
* fix(langfuse): fix token reporting to use usage_details format
- Change usage to usage_details for Langfuse v3 SDK compatibility
- Add support for cache_read_input_tokens (OpenAI/Anthropic prompt caching)
- Add logger import and debug logging for token reporting
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* opt http client
* eval command
* eval command
* eval command
* md
* cleanup(tests): remove obsolete test suite and related docs
Remove the entire legacy test suite including:
- Unit tests (test_agent, test_bus, test_channels, test_config)
- Integration tests (test_agent_e2e)
- Test fixtures, utilities, and OpenSpec config
- Test runner tools (tester/)
These tests were outdated and no longer maintained. Future testing
should use a modern testing framework.
* docs(readme): update configuration paths and chat examples
- Update default config path to ~/.openviking/ov.conf
- Add interactive chat mode examples (--no-markdown, --logs flags)
- Remove VKE deployment guide section
- Update Docker volume mount paths
* docs(agent): add comprehensive docstrings to core classes
Add detailed Google-style docstrings to:
- AgentLoop.__init__() - parameters and examples
- AgentLoop._publish_thinking_event() - event publishing
- ToolContext - all attributes documented
- Tool base class - complete usage example
Improves code maintainability and IDE support.
* feat(server): add bot API proxy support and CLI integration
Server changes:
- Add --with-bot flag to enable Bot API proxy
- Register bot_router at /bot/v1 prefix
- Add bot_api_url configuration option
- Initialize bot proxy in bootstrap process
CLI changes:
- Update ov chat endpoint to /bot/v1/chat
- Fix UTF-8 input handling
- Add endpoint configuration via env var
* feat(core): improve agent tools, tracing and session management
- Enhance tool registry with better error handling
- Update OpenAPI channel configuration
- Improve session manager with better state handling
- Enhance Langfuse tracing integration with diagnostic logging
* feat(cli): add agent tools and improve CLI commands
- Enhance CLI commands with new agent tool integration
- Move plugin analysis doc to docs directory
- Add RFC for OpenViking CLI ov-chat command
- Add server restart script
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: DuTao <dutao.1786@bytedance.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: fujiajie.1030 <fujiajie.1030@bytedance.com>