refactor(glmt): remove deprecated environment variables

Remove references to deprecated CCS_GLMT_FORCE_ENGLISH, CCS_GLMT_THINKING_BUDGET, and CCS_GLMT_STREAMING environment variables that were removed in v3.4.3.

Changes:
- README.md: Update GLMT environment variable documentation to reflect current intelligent control system
- tests/unit/glmt/locale-enforcer.test.js: Remove outdated test scenario for removed environment variable
- docs/glmt-controls.md: Rewrite documentation to describe new automatic control mechanisms

The GLMT component now uses intelligent, automatic controls instead of manual environment variable configuration.
This commit is contained in:
kaitranntt committed 2025-11-11 22:10:56 -05:00
1 parent 513e5b693f
commit 66e25b4cc9
3 files changed
+220 -295

No files matched your search

+1 -36
View File
@@ -4,11 +4,10 @@
/**
* LocaleEnforcer Unit Tests
*
* Tests 4 scenarios:
* Tests 3 scenarios:
* 1. English prompt → English output (verify instruction injected)
* 2. Chinese prompt → English output (verify instruction injected)
* 3. Mixed prompt → English output (verify instruction injected)
* 4. Opt-out test: CCS_GLMT_FORCE_ENGLISH=false (allow multilingual)
*/
const assert = require('assert');
@@ -136,40 +135,6 @@ describe('LocaleEnforcer', () => {
});
});
describe('Scenario 4: Opt-out (CCS_GLMT_FORCE_ENGLISH=false)', () => {
it('should not inject instruction when forceEnglish is disabled', () => {
const enforcer = new LocaleEnforcer({ forceEnglish: false });
const messages = [
{ role: 'system', content: '你是一个编程助手' },
{ role: 'user', content: '实现用户认证' }
];
const result = enforcer.injectInstruction(messages);
assert.strictEqual(result.length, 2);
assert.strictEqual(result[0].content, '你是一个编程助手');
assert.strictEqual(result[1].content, '实现用户认证');
assert.ok(!result[0].content.includes('CRITICAL: You MUST respond in English only'));
});
it('should pass through messages unchanged when disabled', () => {
const enforcer = new LocaleEnforcer({ forceEnglish: false });
const originalMessages = [
{
role: 'user',
content: [
{ type: 'text', text: 'Debug the code' },
{ type: 'text', text: '修复这个错误' }
]
}
];
const result = enforcer.injectInstruction(originalMessages);
assert.deepStrictEqual(result, originalMessages);
});
});
describe('Edge cases', () => {
it('should handle empty messages array', () => {
const enforcer = new LocaleEnforcer({ forceEnglish: true });