Skip to main content
Glama

LLM Researcher

by Code-Hex
config.test.ts1.67 kB
import { describe, it, expect } from 'vitest'; import { config } from '@/config.js'; describe('Configuration', () => { it('should have valid default configuration values', () => { expect(typeof config.userAgent).toBe('string'); expect(typeof config.timeout).toBe('number'); expect(typeof config.maxRetries).toBe('number'); expect(typeof config.rateLimitDelay).toBe('number'); expect(typeof config.verbose).toBe('boolean'); expect(typeof config.cacheEnabled).toBe('boolean'); expect(typeof config.maxResults).toBe('number'); expect(config.timeout).toBeGreaterThan(0); expect(config.maxRetries).toBeGreaterThanOrEqual(0); expect(config.rateLimitDelay).toBeGreaterThanOrEqual(0); expect(config.maxResults).toBeGreaterThan(0); expect(config.maxResults).toBeLessThanOrEqual(20); }); it('should have a working log function', () => { expect(typeof config.log).toBe('function'); // Should not throw when called expect(() => config.log('test message')).not.toThrow(); }); it('should contain appropriate user agent string', () => { expect(config.userAgent).toMatch(/LLMResearcher/); expect(config.userAgent).toMatch(/Mozilla/); }); it('should have reasonable timeout values', () => { expect(config.timeout).toBeGreaterThanOrEqual(10000); // At least 10 seconds expect(config.timeout).toBeLessThanOrEqual(120000); // At most 2 minutes }); it('should have appropriate rate limiting', () => { expect(config.rateLimitDelay).toBeGreaterThanOrEqual(500); // At least 0.5 seconds expect(config.rateLimitDelay).toBeLessThanOrEqual(5000); // At most 5 seconds }); });

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Code-Hex/light-research-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server