Commit Graph
78 Commits
Author SHA1 Message Date
Haozhe Wu 051aeb5509 refactor(providers): remove the Requesty built-in provider
Requesty (added in #474) is an OpenAI-compatible gateway whose capabilities
were a copy of OpenRouter's: same provider/model naming, same
extra_body.reasoning opt-in, no adapter code of its own. Built-in slots are
kept for providers with their own behaviour; a gateway that speaks an
existing wire format is configured through that provider, and #1532 (API
Route) is being closed on the same grounds.

Migration, identical request shape: LANGCHAIN_PROVIDER=openrouter,
OPENROUTER_BASE_URL=https://router.requesty.ai/v1, OPENROUTER_API_KEY=<the
Requesty key>. Past news and contributor credits in the READMEs are left
as history; the supported-provider lists drop it.
2026-09-21 20:35:37 +08:00
Haozhe Wu e6095d5209 Merge PR #1474: feat(data): Gildata (恒生聚源) A-share OHLCV loader via the raw-api MCP endpoint 2026-09-21 20:29:34 +08:00
Haozhe Wu 60ef024ba3 fix(providers): a chat-completions refusal that names /v1/responses is healed there (#1473)
OpenAI's gpt-5.6-* reject function tools on /v1/chat/completions unless
reasoning_effort is 'none', the model's own default effort included, so the
agent's default openai configuration failed on its first tool call. Setting
'none' would run the model without its reasoning, so the adapter now treats
that 400 like a rejected temperature (#1223) or stream_options (#1224): the
request is retried on /v1/responses, where langchain-openai carries the effort
as reasoning.effort, and the model is remembered for the process so later
calls go there first. The matcher reads the endpoint's own instruction
(reasoning_effort + not supported + /v1/responses); a gateway that rejects the
field as unknown is not rerouted, an explicit LANGCHAIN_USE_RESPONSES_API=true
is never second-guessed, and a refusal on /v1/responses itself surfaces once.
2026-09-18 15:06:28 +08:00
sambazhu 64ebb7cf5c feat(data): gildata (Hundsun Juyuan) A-share OHLCV loader via the raw-api MCP endpoint
Token-gated source talking to api.gildata.com with JSON-RPC POSTs:
StockDailyQuote with restorationStatus=1 serves forward split-and-dividend
adjusted dailies (caliber split_dividend, measured against a live payload),
volume converted from wan-shares to shares, avgprice/prevclose ignored
(different adjustment basis), silent rows:[] treated as no-data so the
fallback chain keeps walking. Joins the a_share chain tail; unavailable
without GILDATA_TOKEN so existing users see no behavior change.
2026-09-18 13:27:33 +08:00
Antonio 999c3a7f9b feat(providers): add OpenCode provider and send x-opencode-session
OpenCode Go (https://opencode.ai/zen/go/v1) rejects every chat completion
that lacks a stable per-conversation `x-opencode-session` header:

  400 MissingSessionID: Request is missing x-opencode-session and cannot
  be routed efficiently.

The `opencode-go` / `opencode-zen` names (#444) only map env variables;
nothing set the header and neither name is in the settings catalog, so
the only way to reach OpenCode was to re-point another provider at its
URL, which then failed as above.

- Add a canonical `opencode` provider (OPENCODE_API_KEY / OPENCODE_BASE_URL,
  default Go root, Zen offered as a base_url option) to the settings
  catalog, capabilities, swarm allowlist and both CLI onboarding surfaces.
  `opencode-go` / `opencode-zen` are unchanged.
- New `src/providers/session_context.py`: a ContextVar carrying the active
  Vibe session id. `AgentLoop.run()` binds it for the whole run.
- `ChatOpenAIWithReasoning` injects `x-opencode-session` when the provider
  is `opencode*` or the base-URL host is opencode.ai (so a `deepseek`
  label pointed at OpenCode also works). The value is the bound session
  id, or a per-adapter UUID outside a session; a caller-supplied header
  wins. The `Vibe-Trading/<version>` User-Agent identifies the client as
  OpenCode's usage policy asks.
- Tests: registration, host detection, ContextVar scoping and wire-level
  header checks via httpx.MockTransport. README and .env.example updated.

Verified against the live Go endpoint: preflight reports `LLM (opencode)
OK` and a chat session completes where it previously failed every time.

Signed-off-by: Antonio <tonydu@gmail.com>
2026-09-11 16:16:49 +08:00
averatec0773 4bdfd81bb2 feat(config): add VIBE_TRADING_ANTHROPIC_PROMPT_CACHE flag
Default on. Documented in .env.example next to the other Anthropic settings; it is the off switch for a compatible proxy that rejects the cache_control request parameter.

Signed-off-by: averatec0773 <575907690@qq.com>
2026-09-05 22:43:38 -05:00
Haozhe Wu 3e27d25ad2 fix(providers): make the compat-path stream retry structural, and close the two #1223 side fixes
Hardens the retry #1246 adds: it restarted the whole stream on the
temperature 400 because that error arrives before the first chunk. True, but
that is a property of the provider, not of this code — the retry now re-raises
once a chunk has been emitted, so a mid-stream error matching the detector can
never replay already-emitted output.

Also lands the two fixes promised on #1223 and not covered by that PR:

- ANTHROPIC_API_KEY joins env_schema. It was read through a bare os.getenv, so
  provider doctor and preflight could not tell a missing key from a working
  one and it surfaced as an opaque 401 at the first call.
- .env.example states that pointing OPENAI_BASE_URL at Anthropic's
  compatibility endpoint is not a supported route.
2026-08-29 11:37:28 +08:00
lorenzozanee 6a3b0b590e fix(agent): escalate stream retry delays and honor Retry-After
The single stream retry slept a fixed constant at both call sites, so a
sustained provider overload burned the retry budget at a flat 1s per
iteration. Each site now doubles the delay across consecutive retryable
failures (capped, exponent clamped like the worker-level backoff) and
honors a provider-suggested Retry-After on 429/529, bounded by the new
SWARM_STREAM_RETRY_MAX_DELAY_S / VT_STREAM_RETRY_MAX_DELAY_S knobs.
Retry-After is extracted once on ProviderStreamError so every retry site
benefits. Retry counts and first-failure timing are unchanged.

Closes #1208

Signed-off-by: lorenzozanee <wyz0707@proton.me>
2026-08-29 05:14:21 +08:00
sambazhuandClaude e132aec7b8 docs(settings): surface adjustment-caliber caveat in source priority card
Address PR review feedback (#1231): reordering a market's chain is now
user-facing, but sources differ in adjustment basis (yahoo/yfinance serve
raw OHLC while tencent/eastmoney/tushare serve adjusted prices), so a
reordered chain can silently change backtest numbers. Document the caveat
next to the setting (card + .env.example) in all seven locales; the
provenance stamp itself stays with the #1207 items 6/7 fix.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-27 13:15:55 +08:00
sambazhuandClaude ad79b62e9a feat(data): env-configurable per-market source-order overrides
FALLBACK_CHAINS order was hardcoded; users with paid feeds (e.g. Tushare)
could not prioritize them without editing code. Add one env var per market
(MARKET_DATA_ORDER_<MARKET>, e.g. tushare-first for A-shares) whose value
must be a permutation of the market's default chain — invalid values warn
and keep the default, so a typo can never strip a market of sources.

- registry: snapshot default chains; refresh_source_order_overrides()
  reassigns chains in place (dict identity preserved for by-name importers)
  and is snapshot-gated, so override-free environments never touch
  FALLBACK_CHAINS. Hooked at import, _ensure_registered() and fetch start.
- market_data: auto-detected groups start at the override's head; explicit
  source requests, local:/qveris/tickerall codes and the
  fallback_chain_provider test hook keep their existing semantics.
- settings API: GET /settings/data-sources returns per-market
  default/effective/override state; PUT validates permutations (400 before
  persisting), writes ~/.vibe-trading/.env and hot-applies in-process.
- env_schema: declare the 12 vars on DataConfig for visibility.
- tests: registry machinery, market_data routing guards, settings API
  round-trip/reset/validation, env defaults, conftest shell scrub.

Default chains are byte-for-byte unchanged.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-26 16:22:19 +08:00
PP1 7b4edeaf15 fix(swarm): back off worker retries
Signed-off-by: PP1 <74917296+pengpengyi92@users.noreply.github.com>
2026-08-24 22:06:42 +08:00
Haozhe Wu d3d646d220 Merge pull request #990 from sykuang/feat/copilot-provider
feat(providers): add GitHub Copilot SDK support
2026-08-14 21:20:59 +08:00
Haozhe Wu 2cea4c270b Merge pull request #968 from miguelangelo78/feat/tickerall-data-source
feat(loaders): add tickerall hosted MetaTrader 5 data source
2026-08-14 20:54:03 +08:00
Haozhe Wu a8de9ce307 Merge origin/main into the Copilot provider branch
One conflict: main had added Novita AI to the README provider line while this
branch added GitHub Copilot. Kept both.

Also completes two lists this branch left partly filled, which is what CI was
failing on:

- `es.json` was missing `providerUsesManagedAuth` and `authentication`. This
  branch was opened before the Spanish locale existed (#1087, 2026-08-13) and
  added the pair to the other five, so the type check compared es to en and
  found two keys short — `error TS2322 ... is missing the following properties`.
- The five non-English READMEs still listed the providers without GitHub
  Copilot; only the English one was updated.
2026-08-14 20:24:16 +08:00
Haozhe Wu 3a0e69b6fa Merge pull request #1025 from cgycorey/fix/reasoning-effort-responses
fix(llm): honor reasoning effort in chat completions
2026-08-14 20:21:48 +08:00
Haozhe Wu db1dd35bab Merge remote-tracking branch 'origin/main' into pr-968 2026-08-14 20:17:41 +08:00
miguelangelo78 6d1f398bd7 feat(loaders): add tickerall hosted MetaTrader 5 data source
Add an opt-in `tickerall` forex/metals OHLCV loader that reads a broker account's
candle history through the hosted TickerAll MetaTrader 5 API (https://tickerall.com),
so backtests pull the same broker feed as the `mt5` loader from any OS with no
local, logged-in MetaTrader 5 terminal.

Rebuilt from current `main` on a fresh branch (per review feedback), honoring the
four-point contract:

- Explicit-only: registered in VALID_SOURCES but NEVER inserted into any automatic
  fallback chain, so a user's broker credential is used only on a deliberate
  `source="tickerall"` request. Also added to _NO_NETWORK_FALLBACK_SOURCES, so an
  explicit request to an unavailable tickerall raises (with a TICKERALL_API_KEY
  hint) instead of silently degrading through the forex chain. (Guarded by
  test_registry + the loader tests.)
- Read-only + scoped: every request is an HTTP GET to a read endpoint
  (`/candles`, `/symbols`) for the single configured account; there is no trade or
  mutation path in the module.
- Cache identity: both the symbol memo (keyed by `(base_url, account)`) and the
  frame cache key include the account id + full base URL, so two accounts - or the
  same account on a different endpoint - never collide.
- Partial history is an error: uses the endpoint's exact `from`/`to` date-range
  mode and its completeness signals - a 200 flagged `truncated`, a 400
  `range_too_large` (window wider than one request may carry), or a response
  carrying no completeness signal at all - each raises `IncompleteHistoryError`
  instead of returning a silently short/absent series.

Broker account-type suffixes (e.g. Exness `EURUSDm`) resolve from the account's own
symbol list, mirroring the `mt5` loader. Adds env-schema keys + `.env.example`,
tickerall's annualisation entries (mirroring mt5's 24x5 forex sessions) so the
metrics coverage test stays green, data-routing/README/SKILL docs, and a
mocked-HTTP test suite covering all four contract points.

Verified live against api.tickerall.com on a demo account: real EURUSD/XAUUSD bars
across daily + intraday timeframes and multi-year windows; an over-limit window
raises IncompleteHistoryError rather than dropping the symbol.

Signed-off-by: miguelangelo78 <santosmiguel25@gmail.com>
2026-08-14 10:58:06 +00:00
Haozhe Wu e334846b30 Merge origin/main into the Novita provider branch
Two conflicts, both resolved toward main:

- README provider line: main had added ModelScope while this branch added
  Novita AI. Kept both.
- `test_cli_init.py`: this branch bumped the hardcoded menu numbers 18/19
  because inserting Novita shifts the list. Main had since replaced those
  literals with `_provider_choice_number(<provider>)`, which looks the number
  up from `_PROVIDER_CHOICES` and does not need touching when a provider is
  inserted. Took main's helper, so the bumped literals are no longer needed.

Also lists Novita AI in the other five READMEs. The PR added it to the English
provider line only; the same sentence lives in all six and the count-consistency
tests compare them to each other, so five locales would have advertised a
shorter list than the code ships.
2026-08-14 18:52:50 +08:00
cgycorey 27a17ffe46 fix(llm): honor reasoning effort across transports 2026-08-14 11:26:04 +01:00
SYKuang 8aea83556d docs(providers): explain Copilot SDK setup
Signed-off-by: SYKuang <sykuang.tw@gmail.com>
2026-08-14 10:57:54 +08:00
SYKuang 2dcefe8a52 feat(providers): add GitHub Copilot SDK support
Use the official SDK credential chain instead of a borrowed OAuth client or editor-identification headers.

Signed-off-by: SYKuang <sykuang.tw@gmail.com>
2026-08-14 10:57:54 +08:00
cgycorey 1f2f79f962 fix(llm): honor reasoning effort in chat completions 2026-08-13 20:06:39 +01:00
cgycorey 8a66de1190 fix(llm): route configured reasoning effort through Responses API 2026-08-13 20:01:04 +01:00
jax-novita 0afd341389 Recommend Novita's current flagship models
The models listed for Novita were older ids that no longer reflect what
the platform leads with. Point the recommendations at the three current
flagships instead, each verified against api.novita.ai:

  moonshotai/kimi-k3              1M context, native vision
  zai-org/glm-5.2                 1M context, long-horizon agentic work
  deepseek/deepseek-v4-flash-0731 1M context, cheapest of the three

Context windows, output limits, input modalities and pricing were taken
from the live /openai/v1/models response rather than carried over.

Signed-off-by: jax-novita <jax-novita@users.noreply.github.com>
2026-08-11 07:24:45 +08:00
Haozhe Wu ed4d6df767 Merge pull request #1011 from yrk111222/feat/add-modelscope-provider
feat(providers): add ModelScope as an OpenAI-compatible provider
2026-08-09 18:30:08 +08:00
Haozhe Wu 7d921ac6e6 Merge pull request #989 from ofeksh-tr/feat/etoro-connector
feat(etoro): add Public API connector with demo/real profiles
2026-08-08 22:53:11 +08:00
warren618 5ec7dec2be fix(providers): disable sync and async proxy routing 2026-08-08 22:32:00 +08:00
warren618 b3d4f611da Merge remote-tracking branch 'origin/main' into codex/pr989-ready-20260808 2026-08-08 21:53:52 +08:00
Dineesh D 0f5ddf102a harden(api): authenticate capability surfaces and enforce CSP (#961)
Enforce CSP, protect capability/schema endpoints, disable interactive docs in keyed deployments, and bound MSTeams webhook bodies while preserving the default Docker localhost flow.
2026-08-08 21:32:01 +08:00
yrk eeaefe9e19 feat(providers): add ModelScope as an OpenAI-compatible provider
Signed-off-by: yrk <2493404415@qq.com>
2026-08-07 15:42:05 +08:00
Ofek Shaked 9d6a43e08d feat(etoro): add full Public API connector with demo/real profiles
Implement eToro REST client with demo/real path separation, normalized
reads, trading writes, copy-trading workflows, four connection profiles,
live-action safety gates, and first-class agent tools. Unit tests use
injectable transport; no broker writes in CI.

Signed-off-by: Ofek Shaked <ofeksh@etoro.com>
2026-08-05 16:33:22 +03:00
Pham Van Ngoan 516ae67ef7 feat(scheduled-research): add timezone-aware local schedules (#954)
Evaluate cron schedules in typed IANA zones with documented DST gap/fold semantics, preserve legacy UTC and interval behavior, and add Scheduled Research Web/i18n/docs coverage.

Closes #953.
2026-08-03 20:46:52 +08:00
jax-novita 3c4d707700 feat(providers): add Novita AI as an OpenAI-compatible provider
Wire Novita AI's OpenAI-compatible endpoint
(https://api.novita.ai/openai, Bearer API key) through the provider
registry, capabilities, legacy CLI onboarding, .env.example, and the
README provider list. Novita rides the generic OpenAI-compatible path
with no special capability flags; the default model is
deepseek/deepseek-v3.2, which supports function calling.

Model IDs use ``vendor/model`` naming and were verified against the live
public catalog at https://api.novita.ai/openai/v1/models.

Signed-off-by: jax-novita <jax@novita.ai>
2026-08-03 10:43:51 +08:00
Haozhe Wu 757e8ba9f7 fix(scheduler): retry transient scheduled research failures 2026-08-01 17:52:31 +08:00
Xiaotian JinandClaude Fable 5 c7d2ebaab8 fix: store session and run history under the user runtime root, not the code (#925)
* fix: store session and run history under the user runtime root, not the code (#904)

Sessions, runs, swarm runs, and uploads were resolved relative to the
installed code, so a pip install wrote user history into site-packages
(lost on upgrade) and dev checkouts partitioned history per clone.

- src/config/paths.py: VIBE_TRADING_HOME env override for
  get_runtime_root() (explicit config_path still wins), plus
  get_sessions_dir / get_runs_dir / get_swarm_runs_dir / get_uploads_dir
  as the single source of truth.
- Redirect every code-relative definition site: cli/_legacy.py,
  src/agent/loop.py, src/api/helpers.py, src/api/uploads_routes.py,
  src/swarm/store.py (swarm_runs_root), src/tools/swarm_tool.py, and
  the TraceWriter.find_trace_dir defaults. .swarm/runs becomes
  swarm/runs under the already-hidden runtime root.
- src/config/migrate.py: idempotent one-time move of legacy
  <install>/{sessions,runs,.swarm/runs,uploads} into the runtime root,
  wired into the CLI entry, api_server startup, and vibe-trading-mcp;
  when both sides hold data the new location wins and the legacy dir is
  left in place with a warning, never silently merged.
- path_utils: browser-upload handles (uploads/<name>) resolve to the
  user-level uploads dir, and the file/write/run sandbox allow-lists
  follow VIBE_TRADING_HOME.
- Welcome banner Workspace row now reports the runtime root, so the UI
  shows which store is active.

Fixes #904.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix: close the gaps a local multi-agent review of #925 found

- Redirect the eighth definition site the first pass missed:
  src/api/swarm_routes.py built its SwarmStore from the code-relative
  .swarm/runs, so API-started swarms still wrote into site-packages,
  split from CLI/MCP history, and landed outside the run-root sandbox
  allow-list (P03-A regression). It now shares swarm_runs_root().
- Rework migration to child-level merges: autopilot runs and channel
  media already populate ~/.vibe-trading/{runs,uploads}, so the old
  whole-directory "both non-empty -> skip" rule silently stranded all
  legacy history for those users. Each session/run/upload entry now
  moves individually via a .migrating-* staging name plus atomic
  rename (interrupted moves are recovered, never surfaced half-copied),
  only same-named entries are skipped, a directory containing
  __init__.py is never touched (site-packages/runs may be someone
  else's distribution), one failing directory no longer blocks the
  rest, and the emptied legacy .swarm shell is removed.
- Route the sessions.db FTS index, the goal store default, and the CLI
  banner probe through get_runtime_root() so VIBE_TRADING_HOME no
  longer splits the index from the sessions it indexes.
- Reject UNC paths in VIBE_TRADING_HOME, matching the hardening on the
  other root-widening env vars, and keep legacy agent/.swarm/runs in
  the run-root allow-list like the other legacy roots.
- Correct the .env.example rationale (constants bind at process start,
  before .env is read), scope the README claim to what actually
  relocates, sync the zh/ja/ko/ar READMEs, and refresh stale docstrings.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-31 21:30:52 +08:00
Haozhe Wu 3eb86996f5 docs: sync CLAUDE.md and .env.example with this batch
Loaders 23 -> 24 (pykrx), engines 8 -> 9 (KoreaEquity), plus the two new
environment variables (VIBE_TW_STOCK_DB, VIBE_TRADING_EXTRA_CORS_ORIGINS),
the OpenBB Workspace bridge and its CORS opt-in, the conditional Taiwan
snapshot tool, the execution-time price-limit rule now shared by every
banded engine, the one-run-per-session 409 contract with cancellation as
its own terminal state, and the sink-aware trace redaction policy.
2026-07-30 15:06:28 +08:00
1anter 7af56b93eb feat(providers): send top-level reasoning_effort to direct OpenAI (#755)
Direct OpenAI needs an explicit top-level reasoning_effort — including the
literal "none" — which the agent could not express: the setting was
documented as relay-only and never reached the client constructor.

Reworked from the contribution, which gated on "every provider whose
openrouter_reasoning_body is false". That would have sent the field to
DeepSeek, Gemini, Groq, DashScope, Zhipu, NVIDIA, Spark and MiniMax, any
of which may reject an unknown field, and it contradicted the existing
DeepSeek invariant asserted in test_provider_diagnostics.py. Gating is now
a positive allowlist covering direct OpenAI only.

The allowlist deliberately checks BOTH the resolved capability name and
the configured provider name, because either check alone leaks the field:
model inference maps provider=openai + a deepseek model onto DeepSeek
capabilities, and unknown providers fall back to OpenAI capabilities, so a
flag on the capability record alone would start sending the field to any
unrecognised gateway.

OpenRouter/Requesty keep their extra_body.reasoning path untouched. The
settings allowlist accepts "none" and its rejection message now lists the
values it actually permits. Settings exposes the option through t() with
labels in all five locales, and provider_diagnostics reports the resolved
capability so `doctor` can explain why an effort is or is not sent.
2026-07-30 13:17:32 +08:00
shadowinlifeandQoder b9507ee12b feat(memory): implement Tier 2 structural organization (#815)
* feat(memory): implement Tier 2 structural organization

Add four independent modules for memory structural organization:
- H-MEM hierarchical directory routing (hierarchy.py)
- A-MEM semantic linking via BM25 (semantic_links.py)
- Auto-compression pipeline via TF-IDF (compression.py)
- FTS5 full-text search index (search_index.py)

Integration:
- 4 feature flags in MemoryConfig (default: disabled)
- MemoryEntry extended with category + compression_level fields
- persistent.py wired with hierarchy routing, FTS5 search, link expansion
- lifecycle.py triggers compression in GC cycle
- remember_tool.py attaches related links in recall results
- FTS5 CJK bigram+unigram indexing for better Chinese recall
- Lazy auto-rebuild on first FTS5 search

Testing:
- 163 unit tests + 9 integration tests + 23 benchmarks (all passing)
- Benchmark evaluated on 200 real production memories + 50 labeled queries
- Compression retention: daily 91.4%, digest 97.1%
- Hierarchy routing: 93.3% P@5 parity with full scan

Closes #732 (Tier 2 scope)

Signed-off-by: shadowinlife <shadowinlife@gmail.com>

Co-Authored-By: Qoder <noreply@qoder.com>
AI-Contributed/Feature: 1582/1871
AI-Contributed/UT: 2123/2159

* feat(memory): add VT_MEMORY=off|on|full business-friendly preset

Simplify memory configuration from 7 individual boolean flags to a
single business-friendly environment variable:
  - off:  all features disabled (default, backward compatible)
  - on:   Tier 1 quality + decay + garbage collection
  - full: Tier 1 + Tier 2 hierarchy + links + compression + FTS

Individual VT_MEMORY_* flags still work as explicit overrides with
higher priority than the preset baseline.

Also adds a dependency-conflict warning in lifecycle.py when
compression is enabled without GC.

Signed-off-by: shadowinlife <shadowinlife@gmail.com>

AI-Contributed/Feature: 0/138
AI-Contributed/UT: 0/0

* docs: add Memory Tier 2 and VT_MEMORY preset to CHANGELOG

Document the new structural organization features (hierarchy, semantic
links, compression, FTS5) and the business-friendly VT_MEMORY=off|on|full
configuration preset.

Signed-off-by: shadowinlife <shadowinlife@gmail.com>

AI-Contributed/Feature: 0/15
AI-Contributed/UT: 0/0

---------

Co-authored-by: Qoder <noreply@qoder.com>
2026-07-24 22:13:16 +08:00
Haozhe Wu 33448d7d7a Merge PR #733: feat(memory): implement Phase 1 quality-driven lifecycle management
feat(memory): implement Phase 1 quality-driven lifecycle management
2026-07-23 11:39:34 +08:00
shadowinlife fc6ee69f4b fix(memory): gate features behind flags per maintainer review
- Gate find_relevant importance multiplier behind VT_MEMORY_DECAY
- Gate content deduplication behind VT_MEMORY_QUALITY
- Remove compute_hotness / VT_MEMORY_HOTNESS_DECAY (out of scope)
- Remove hotness_decay test file
- Update tests to enable required feature flags

Refs: #732
Signed-off-by: shadowinlife <shadowinlife@gmail.com>
2026-07-21 15:17:29 +08:00
shadowinlife 6ffa63be8d feat(memory): add content dedup, hotness decay and P@5 benchmark
- Implement SHA-256 content-hash deduplication with 30s sliding window
- Add compute_hotness() with sigmoid frequency × exponential recency decay
- Register VT_MEMORY_HOTNESS_DECAY feature flag (default off)
- Add P@5/MRR/NDCG@5 evaluation framework with A/B comparison
- Benchmark shows +12.9% P@5 improvement with lifecycle-aware retrieval
- 35 new tests (17 dedup + 8 hotness + 10 benchmark)

Refs: #732
Signed-off-by: shadowinlife <shadowinlife@gmail.com>
2026-07-21 14:12:30 +08:00
Haozhe Wu cab87bd40a Merge pull request #731 from octo-patch/octopatch/minimax-cn-endpoint
feat: expose MiniMax regional API endpoints
2026-07-21 12:26:23 +08:00
Haozhe Wu c1f9f96a60 Merge PR #548: feat(ocr): pluggable engine architecture + LLM vision OCR + configurable threshold
Self-fix on merge: the qwen-vl → llm-vision deprecation warning now calls out the
credential-source change (DASHSCOPE_API_KEY → configured LANGCHAIN_PROVIDER) so
existing DashScope users aren't surprised. Generalizes the shipped qwen-vl engine
into a provider-agnostic llm-vision engine + entry-point plugin discovery + OCR
threshold + quality metrics. Closes #547.
2026-07-20 18:56:15 +08:00
Haozhe Wu 2400bbcbaa Merge PR #695: feat(providers): add native Anthropic Messages API support
Self-fix on merge: moved langchain-anthropic from core dependencies to an
[anthropic] optional extra (like [deepseek]) — _build_anthropic lazy-imports it
and raises an actionable install hint, so the base install stays lean. Resolved
llm.py conflicts against #563's centralized get_llm_credentials + the anthropic
native adapter-mode branch. Closes #694.
2026-07-20 18:55:21 +08:00
Haozhe Wu 7ba3bf2f5d Merge PR #537: feat(providers): add iFlytek Spark as an OpenAI-compatible provider 2026-07-20 18:31:33 +08:00
Jelech 39ea99a4d9 feat(providers): support ANTHROPIC_MAX_TOKENS configuration 2026-07-20 10:51:58 +08:00
shadowinlife cfca5504b1 docs(memory): add lifecycle feature flags to .env.example
Document VT_MEMORY_QUALITY, VT_MEMORY_GC, and VT_MEMORY_DECAY
environment variables with descriptions and default values.

Signed-off-by: shadowinlife <shadowinlife@gmail.com>
2026-07-19 23:28:42 +08:00
octo-patch 6dc76e1ad3 feat: expose MiniMax regional endpoints 2026-07-19 20:06:43 +08:00
Jelech f21d8620fd feat(providers): support ANTHROPIC message 2026-07-17 13:31:44 +08:00
root 0de5a78ccd build: add Longbridge credentials module and optional dependency
- Add credentials.py: unified credential resolution for data and trading
- Add test_longbridge_credentials.py: coverage for credential resolution
- Remove longbridge from requirements.txt (optional extra only)
- Update requirements-lock.txt
- Update .env.example with Longbridge credential hints
2026-07-16 19:23:54 +08:00