Coverage for src / agent / config / constants.py: 100%

20 statements  

« prev     ^ index     » next       coverage.py v7.13.0, created at 2025-12-11 14:30 +0000

1# Copyright 2025-2026 Microsoft Corporation 

2# 

3# Licensed under the Apache License, Version 2.0 (the "License"); 

4# you may not use this file except in compliance with the License. 

5# You may obtain a copy of the License at 

6# 

7# http://www.apache.org/licenses/LICENSE-2.0 

8# 

9# Unless required by applicable law or agreed to in writing, software 

10# distributed under the License is distributed on an "AS IS" BASIS, 

11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 

12# See the License for the specific language governing permissions and 

13# limitations under the License. 

14 

15"""Configuration constants for OSDU Agent. 

16 

17This module provides a single source of truth for all default configuration values. 

18Separated from defaults.py and schema.py to avoid circular imports. 

19""" 

20 

21from pathlib import Path 

22 

23# Default paths 

24DEFAULT_CONFIG_PATH = Path.home() / ".osdu-agent" / "settings.json" 

25DEFAULT_DATA_DIR = Path.home() / ".osdu-agent" 

26DEFAULT_MEMORY_DIR = DEFAULT_DATA_DIR / "memory" 

27DEFAULT_SESSION_DIR = DEFAULT_DATA_DIR / "sessions" 

28 

29# Default provider settings 

30DEFAULT_LOCAL_BASE_URL = "http://localhost:12434/engines/llama.cpp/v1" 

31DEFAULT_LOCAL_MODEL = "ai/phi4" 

32DEFAULT_OPENAI_MODEL = "gpt-5-mini" 

33DEFAULT_ANTHROPIC_MODEL = "claude-haiku-4-5-20251001" 

34DEFAULT_AZURE_API_VERSION = "2025-03-01-preview" 

35DEFAULT_GEMINI_MODEL = "gemini-2.0-flash-exp" 

36DEFAULT_GITHUB_MODEL = "gpt-4o-mini" 

37DEFAULT_GITHUB_ENDPOINT = "https://models.github.ai" 

38 

39# Default telemetry settings 

40DEFAULT_OTLP_ENDPOINT = "http://localhost:4317" 

41 

42# Default memory settings 

43DEFAULT_MEMORY_TYPE = "in_memory" 

44DEFAULT_MEMORY_HISTORY_LIMIT = 20 

45 

46# Package Registry Configuration (for self-update) 

47PACKAGE_NAME = "osdu-agent" 

48PACKAGE_REGISTRY_PROJECT_ID = "1611" 

49OSDU_GITLAB_URL = "https://community.opengroup.org" 

50PACKAGE_REGISTRY_URL = ( 

51 f"https://community.opengroup.org/api/v4/projects/" 

52 f"{PACKAGE_REGISTRY_PROJECT_ID}/packages/pypi/simple" 

53)