Compare commits

..

1 Commits

Author SHA1 Message Date
huanghuoguoguo
81ac771fb5 fix(provider): use LiteLLM input window for context length 2026-06-13 21:23:58 +08:00
7 changed files with 3 additions and 23 deletions

View File

@@ -1,6 +1,6 @@
[project]
name = "langbot"
version = "4.10.2"
version = "4.10.1"
description = "Production-grade platform for building agentic IM bots"
readme = "README.md"
license-files = ["LICENSE"]

View File

@@ -1,3 +1,3 @@
"""LangBot - Production-grade platform for building agentic IM bots"""
__version__ = '4.10.2'
__version__ = '4.10.1'

View File

@@ -202,16 +202,6 @@ class LoadConfigStage(stage.BootingStage):
constants.instance_id = new_id
constants.edition = ap.instance_config.data.get('system', {}).get('edition', 'community')
# Instance creation timestamp: sourced from data/labels/instance_id.json.
# Instances created before this field existed (or supplied via
# system.instance_id) won't have it, so backfill with the current time
# and persist it via the dump below — from then on it stays stable.
instance_create_ts = ap.instance_id.data.get('instance_create_ts', 0)
if not isinstance(instance_create_ts, int) or instance_create_ts <= 0:
instance_create_ts = int(time.time())
ap.instance_id.data['instance_create_ts'] = instance_create_ts
constants.instance_create_ts = instance_create_ts
print(f'LangBot instance id: {constants.instance_id}')
print(f'LangBot edition: {constants.edition}')

View File

@@ -109,7 +109,6 @@ async def build_heartbeat_payload(ap: core_app.Application) -> dict:
'query_id': '',
'version': constants.semantic_version,
'instance_id': constants.instance_id,
'instance_create_ts': constants.instance_create_ts,
'edition': constants.edition,
'features': features,
'timestamp': datetime.now(timezone.utc).isoformat(),

View File

@@ -16,11 +16,3 @@ debug_mode = False
edition = 'community'
instance_id = ''
instance_create_ts = 0
"""Unix timestamp (seconds) of when this instance was first created.
Sourced from ``data/labels/instance_id.json``. Backfilled to the current
time for instances created before this field existed, so it is always a
positive value once load_config has run.
"""

View File

@@ -62,7 +62,6 @@ class TestBuildHeartbeatPayload:
assert payload['event_type'] == 'instance_heartbeat'
assert payload['query_id'] == ''
assert 'instance_create_ts' in payload
assert 'timestamp' in payload
f = payload['features']
assert f['database'] == 'postgresql'

2
uv.lock generated
View File

@@ -1967,7 +1967,7 @@ wheels = [
[[package]]
name = "langbot"
version = "4.10.2"
version = "4.10.1"
source = { editable = "." }
dependencies = [
{ name = "aiocqhttp" },